[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: process result code in if

From: Tim Rice
Subject: Re: process result code in if
Date: Fri, 7 Jun 2013 06:34:26 -0700 (PDT)

On Fri, 7 Jun 2013, A.P. Horst wrote:

> Thanks for all the great input! Seems google isn't always your best friend, at
> least not when it comes to autoconf. The solution with the test command is
> very elegant and readable.
> I ended up using this:
> if ! test $var -gt 0 > /dev/null 2>&1; then
>     <not a positive integer>
> fi

"if ! test ..."  is definitely not portable.

> This works also when something else than a number or nothing at all is given.
> I will try to remember autoconf also eats brackets.
> arie

Tim Rice                                Multitalents

reply via email to

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