From: chase Date: Sun, 12 Aug 2018 15:15:50 +0000 (-0500) Subject: linksLast and uncomment: Fix shellcheck warnings X-Git-Tag: 2.3.0a~26^2~25 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5fb08c15d93aea04b2c451bf2a6a155cc18debd2;p=oweals%2Fcde.git linksLast and uncomment: Fix shellcheck warnings --- diff --git a/cde/admin/IntegTools/dbTools/linksLast b/cde/admin/IntegTools/dbTools/linksLast index d79e6bdd..e01927c7 100755 --- a/cde/admin/IntegTools/dbTools/linksLast +++ b/cde/admin/IntegTools/dbTools/linksLast @@ -8,9 +8,9 @@ USAGE="Usage: $0 file.lst" case $# in - 0) echo $USAGE;; + 0) echo "$USAGE";; 1);; - *) echo $USAGE;; + *) echo "$USAGE";; esac awk ' @@ -20,4 +20,4 @@ END { if ( i > 0 ) for ( i in links) print links[i]; } -' $@ +' "$@" diff --git a/cde/admin/IntegTools/dbTools/uncomment b/cde/admin/IntegTools/dbTools/uncomment index 699120c4..4ca80e92 100755 --- a/cde/admin/IntegTools/dbTools/uncomment +++ b/cde/admin/IntegTools/dbTools/uncomment @@ -5,5 +5,5 @@ # and coalesce multiple blanks/tabs into a single blank # -cat $@ | egrep -v '^[ ]*#|^[ ]*$' | sed 's/[ ][ ]*/ /g'|\ +cat "$@" | grep -E -v '^[ ]*#|^[ ]*$' | sed 's/[ ][ ]*/ /g'|\ sed 's/ $//'