From: Andreas Schneider Date: Fri, 10 Jun 2022 11:07:49 +0000 (+0200) Subject: s4:script: Fix shellcheck errors in find_unused_options.sh X-Git-Tag: talloc-2.4.0~1367 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d85a2dbfd78ed58219f6572b7a5ae08d2422464d;p=thirdparty%2Fsamba.git s4:script: Fix shellcheck errors in find_unused_options.sh source4/script/find_unused_options.sh:20:16: error: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087] source4/script/find_unused_options.sh:30:16: error: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087] Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- diff --git a/source4/script/find_unused_options.sh b/source4/script/find_unused_options.sh index 36e97710488..ad56fabed26 100755 --- a/source4/script/find_unused_options.sh +++ b/source4/script/find_unused_options.sh @@ -17,7 +17,7 @@ for i in $LIST_GLOBAL; do key=$(echo $i | cut -d ':' -f1) val=$(echo $i | cut -d ':' -f2) - found=$(grep "$key[ ]*()" $CFILES) + found=$(grep "${key}[ ]*()" $CFILES) if test -z "$found"; then echo "Not Used Global: $key() -> $val" fi @@ -27,7 +27,7 @@ for i in $LIST_LOCAL; do key=$(echo $i | cut -d ':' -f1) val=$(echo $i | cut -d ':' -f2) - found=$(grep "$key[ ]*(" $CFILES) + found=$(grep "${key}[ ]*(" $CFILES) if test -z "$found"; then echo "Not Used LOCAL: $key() -> $val"