From beae9b3e2822021fea741fc98282cf9e0fc1d024 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 5 Jun 2013 19:36:55 -0600 Subject: Double bracket ==/ compare lexicographically, not numerically. Unfortunately for me, that means that it works correctly *most* of the time. But, for example, [[ 10 < 2 ]], and negatives don't work. --- src/lib/libreblacklist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libreblacklist') diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist index 1d73d2f..627bb39 100755 --- a/src/lib/libreblacklist +++ b/src/lib/libreblacklist @@ -103,7 +103,7 @@ if [[ "${0##*/}" == libreblacklist ]]; then sed 's/\r/\n/g'<<<"$1"|sed '/^$/d' } usage() { - if [[ $# == 0 ]]; then + if [[ $# -eq 0 ]]; then printf "Usage: %s [-h] COMMAND [ARGUMENTS]\n" "${0##*/}" echo "Tool for working with the nonfree software blacklist" echo @@ -128,7 +128,7 @@ if [[ "${0##*/}" == libreblacklist ]]; then fi } - if [[ $# == 0 ]]; then + if [[ $# -eq 0 ]]; then usage >/dev/stderr exit 1 fi -- cgit v1.2.3-54-g00ecf