From 5fb08c15d93aea04b2c451bf2a6a155cc18debd2 Mon Sep 17 00:00:00 2001 From: chase Date: Sun, 12 Aug 2018 10:15:50 -0500 Subject: [PATCH] linksLast and uncomment: Fix shellcheck warnings --- cde/admin/IntegTools/dbTools/linksLast | 6 +++--- cde/admin/IntegTools/dbTools/uncomment | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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/ $//' -- 2.25.1