From f16d297c691b0e76eb77ff16a29b4172a56ca145 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sun, 10 Mar 2024 23:15:11 -0700 Subject: [PATCH] fix shellcheck errors in 2018/burton2/spotcheck.sh --- 2018/burton2/spotcheck.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/2018/burton2/spotcheck.sh b/2018/burton2/spotcheck.sh index 117503470..a0936bac4 100755 --- a/2018/burton2/spotcheck.sh +++ b/2018/burton2/spotcheck.sh @@ -1,26 +1,26 @@ #!/usr/bin/env bash -ioc=$1 -: ${iocccsize:=iocccsize} -: ${ioc:=prog} +ioc="$1" +: "${iocccsize:=iocccsize}" +: "${ioc:=prog}" opt=-crs kopt=-kcrs -for name in $*; do +for name in "$@"; do - if test $name != $ioc; then + if test "$name" != "$ioc"; then - a=$($ioc $opt < $name 2>&1) - b=$($iocccsize $opt < $name 2>&1) + a=$("$ioc" "$opt" < "$name" 2>&1) + b=$("$iocccsize" "$opt" < "$name" 2>&1) if test "$a" != "$b"; then - echo $a , $b , $name + echo "$a" , "$b" , "$name" fi - a=$($ioc $kopt < $name 2>&1) - b=$($iocccsize $kopt < $name 2>&1) + a=$("$ioc" "$kopt" < "$name" 2>&1) + b=$("$iocccsize" "$kopt" < "$name" 2>&1) if test "$a" != "$b"; then - echo $a , $b , $name " keep" + echo "$a" , "$b" , "$name" " keep" fi fi