I am trying to run following condition with both variables having numeric values "1,2,3"
if [ '$NEW_STATE' -gt '$OLD_STATE' ];
when i run it i get following error:
$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.
[IMG]http://lqcdn.thequestionsnetwork.net/questions/images/icons/useragent/icon\_windows_7.gif[/IMG] [IMG]http://lqcdn.thequestionsnetwork.net/questions/images/statusicon/forum_new.gif[/IMG] [[IMG]http://lqcdn.thequestionsnetwork.net/questions/images/buttons/report.gif[/IMG]](http://www.linuxquestions.org/questions/report.php?p=4655513)