help-bash
[Top][All Lists]
Advanced

[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:42 +0100

and no need to quote that left side inside [[

On Wed, Nov 17, 2021, 09:46 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:

> 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
>>
>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]