Basic question I assume.
I need to check whether a shell script variable contains non-zero numeric data to proceed. The variable should contain numeric values, but may in fact contain zeroes, blank space or nothing.
So far, I have tried various combinations of:
if test $variable
if test $variable -gt 0
echo "good data exists"
else "no good data exists"
It partially works, but I get either "too many arguments" or "integer expression expected"
Thanks for any help.