Permalink
Browse files

Use "-lt" instead of "<" for bash arithmetic comparison

  • Loading branch information...
1 parent 56b053f commit 0c40295b8a3c822ef1994b6333a372f592b5097b @0xced 0xced committed with Jan 12, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 SpeedLimiter
View
@@ -3,7 +3,7 @@ ACTION=$1
shift
if [[ "$ACTION" == "start" ]]; then
- if [[ $# < 4 ]]; then
+ if [[ $# -lt 4 ]]; then
echo "Usage: $0 start [kps] [delay] [plr] [plr-suppress] [comma-separated hosts|\"any\"] [port1] <port2> .. <portn>"
fi
SPEED="$1Kbit/s"
@@ -46,7 +46,7 @@ if [[ "$ACTION" == "start" ]]; then
done
done
elif [[ "$ACTION" == "stop" ]]; then
- if [[ $# < 2 ]]; then
+ if [[ $# -lt 2 ]]; then
echo "Usage: $0 stop [rule1] [rule2] <rule3> .. <rulen>"
exit 1
fi

0 comments on commit 0c40295

Please sign in to comment.