bash - Compare variable with integer in shell? -
i have if statement need run, long value have stored in $counter variable greater 5.
here respective section of current (non-functioning) script:
if $counter > 5 echo "something" fi the mistake i'm making obvious, reason couldn't find solution online.. thanks!
well quite simple:
if [ "$counter" -gt 5 ] echo "something" fi
Comments
Post a Comment