People,
I am running a script and I am trying to compare 2 values.
The input file looks like
111-11-1111| 24000.00
222-22-2222| 32560.15
333-33-3333| 45678.90
The script loks like this
----------------------------------------------------
TMP_FILE = "myfoo"
IFS = '|'
cat $TMP_FILE | while read SSN AMT; do {
if [ $AMT -gt $limit ] ; then
echo $AMT $SSN
fi
} done
---------------------------------------------------
The warning is:
+ read SSN AMT
+ '[' 14402.40 -gt 90000.00 ']'
nestor2.sh: line 50: [: 14402.40: integer expression expected
How do you compare 2 float in shell script preferrable in cshell?
Thanks,
Nestor :-)
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list