[ale] Bash question...
Ken Alexander
kenry at alexandertech.biz
Mon Jul 23 09:43:54 EDT 2007
You can use the arithmetic expression operator - (( ))
if (( $var < -4 )) ; then
..
fi
On Sun, 2007-07-22 at 10:37 -0400, Dr. Brian J. Dowd wrote:
> The value of $var is -4.865876
>
> if [ $var -lt "-4" ];
>
> throws an "Integer expression expected" error
>
> Is there a way to test-evaluate a float like -4.865876 ?
> (or I am I trying to get Bash to use non-integers which it can't do
> without
> some kludge like multiplying all my variables by some arbitrary
> 1x10^x)
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ale
mailing list