1

Awk or If/statement Calculation Problem

view story
linux-howto

http://www.unix.com – Code: #!/bin/sh CURRENTSTATE=2 CSVCSTATE=2 LASTSTATECHANGE=8 CSVCSTATEAGE=5 if (($CURRENTSTATE==$CSVCSTATE))&&(($LASTSTATECHANGE>=$CSVCSTATEAGE)) echo GREAT fi returns: Code: ./aff: line 12: syntax error near unexpected token `fi' ./aff: line 12: `fi' what am i doing wrong here? sometimes, when the numbers are in notation, i also get an error. how can i fix this? i get this error: Code: script.sh: : [: 1.51764e+06: integer expression expected i want to be able to compare any value to a set number. like, if 1.51764e+06 is greater than (HowTos)