[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking numeric arguments
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: Checking numeric arguments |
Date: |
Wed, 17 Nov 2021 09:45:41 +0100 |
it.. would work, imho
On Wed, Nov 17, 2021, 04:04 irenezerafa via <help-bash@gnu.org> wrote:
> I want to check if arguments are numeric. Is the following a good way,
> using case-like patterns
> and using = inside double bracketing [[ ]].
>
> if [[ "$2" = +([[:digit:]]) ]] && [[ "$3" = +([[:digit:]]) ]]; then