linksLast and uncomment: Fix shellcheck warnings
authorchase <chase@localhost.com>
Sun, 12 Aug 2018 15:15:50 +0000 (10:15 -0500)
committerJon Trulson <jon@radscan.com>
Sat, 18 Aug 2018 22:37:36 +0000 (16:37 -0600)
cde/admin/IntegTools/dbTools/linksLast
cde/admin/IntegTools/dbTools/uncomment

index d79e6bdd3f5c1b798d3d4f45c6fae560cb106c3b..e01927c748c4bc0d36ab960a99de8eb48171f93b 100755 (executable)
@@ -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];
 }
-'  $@
+'  "$@"
index 699120c40389c4553458ecad45f1a9e92d2142af..4ca80e9220bfa40d01c6dcd8bba2260ab8e52366 100755 (executable)
@@ -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/ $//'