[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:46:03 +0100 |
you can combine && etc inside [[ too
On Wed, Nov 17, 2021, 09:45 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
> 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
>
>