aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Jackson <barjac@mageia.org>2023-01-30 00:17:15 +0000
committerBarry Jackson <barjac@mageia.org>2023-01-30 00:17:15 +0000
commita66ad0e2dcc9395256ea3acd1b9796c03d40402f (patch)
treeb61a5eef55177c7fcc527e7c349c379711c038f5
parentbe7b1ad540311b8c2c5ea2e2419f29a89805e8d8 (diff)
downloadremove-old-kernels-a66ad0e2dcc9395256ea3acd1b9796c03d40402f.tar
remove-old-kernels-a66ad0e2dcc9395256ea3acd1b9796c03d40402f.tar.gz
remove-old-kernels-a66ad0e2dcc9395256ea3acd1b9796c03d40402f.tar.bz2
remove-old-kernels-a66ad0e2dcc9395256ea3acd1b9796c03d40402f.tar.xz
remove-old-kernels-a66ad0e2dcc9395256ea3acd1b9796c03d40402f.zip
fix integer comparison
-rwxr-xr-xremove-old-kernels2
1 files changed, 1 insertions, 1 deletions
diff --git a/remove-old-kernels b/remove-old-kernels
index 7a695c4..f4547e8 100755
--- a/remove-old-kernels
+++ b/remove-old-kernels
@@ -187,7 +187,7 @@ currcfg="${maincfg}"
# Check for -h option before running chk_cfg (issue10)
o=$(echo "$1"|cut -d- -f2)
[[ "$o" == "?" ]] && o="h"
-if [[ ${#@} = 1 ]] && [[ "h" =~ $o ]]; then
+if (( ${#@} == 1 )) && [[ "h" =~ $o ]]; then
clear; usage; exit 0
fi