13

if condition error: integer expression expected

view full story
linux-howto

http://www.unix.com – I am trying to run following condition with both variables having numeric values "1,2,3" Code:     if [ '$NEW_STATE' -gt '$OLD_STATE' ]; when i run it i get following error: Code:     $NEW_STATE: integer expression expected Please correct me where I'm doing wrong. I'm trying to check either New State is greater or Old state. I have also tried "" for variables. but still not working. (HowTos)