From 7dffce6cbb3e7bc8f70821a948e127d90e2b0538 Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Sat, 25 Jul 2020 14:07:43 +0200 Subject: del-shell: ShellCheck: fix quoting and redirection without a command --- del-shell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'del-shell') diff --git a/del-shell b/del-shell index 7c9163e..e485697 100755 --- a/del-shell +++ b/del-shell @@ -23,12 +23,12 @@ CFG_FILE=/etc/shells # Create $CFG_FILE if needed if [ ! -f $CFG_FILE ]; then - > $CFG_FILE + true > $CFG_FILE exit 0 fi if [ "$num" = 0 ]; then - if [ ! -x $shl ]; then + if [ ! -x "$shl" ]; then grep -v "^$shl$" < $CFG_FILE > $CFG_FILE.new mv -f $CFG_FILE.new $CFG_FILE fi -- cgit v1.2.1