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
, 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.
if (( value > 1000000000 )); then
echo "Warning: xxxxxxx"
Do note also that the shell can only do integer
math. Floating point operations need to be handled with an external tool like bc
See here for too for more on shell arithmetic: