[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Bash question...
- Subject: [ale] Bash question...
- From: kenry at alexandertech.biz (Ken Alexander)
- Date: Mon, 23 Jul 2007 09:43:54 -0400
- In-reply-to: <[email protected]>
- References: <[email protected]>
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...