Something New Continuing Education through Self Motivation

2Nov/090

Bash Numeric Comparison

Do not use > or < when comparing numbers in BASH. It doesn't work. It tries to redirect output instead of performing the comparison. Use -lt or -gt instead.

Additional Reading:

http://fvue.nl/wiki/Bash:_Numeric_comparison

http://tldp.org/LDP/abs/html/

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.

tags

categories

Meta