Please use ***
[code][/code] tags*** around your code and data, to preserve formatting and to improve readability. Please do
not use quote tags, bolding, colors, or other fancy formatting.
And yes, please give us some more context for the operation. Are you using
bash, or another shell? What is the exact error? What exactly does the
$value variable contain? Can you show us more of the code surrounding this?
If you're using
bash or
ksh, it's recommended to use
[[..]] for string/file tests, and
((..)) for numerical tests. Avoid using the old
[..] test unless you specifically need POSIX-style portability.
http://wiki.bash-hackers.org/commands/classictest
http://wiki.bash-hackers.org/syntax/...nal_expression
http://wiki.bash-hackers.org/syntax/arith_expr
Code:
if (( value > 1000000000 )); then
echo "Warning: xxxxxxx"
fi
Do note also that the shell can only do
integer math. Floating point operations need to be handled with an external tool like
bc or
awk.
See here for too for more on shell arithmetic:
arithmetic expressions