Re: process result code in if

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

 



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
tim@xxxxxxxxxxxxxxxx



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux