From: Andreas Schneider Date: Wed, 8 Jun 2022 12:47:20 +0000 (+0200) Subject: s3:script: Fix shellcheck errors in test_smbstatus.sh X-Git-Tag: talloc-2.4.0~1370 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25e9a74e2eb95e67620d506b45d91c9a817b4843;p=thirdparty%2Fsamba.git s3:script: Fix shellcheck errors in test_smbstatus.sh test_smbstatus.sh:78:22: error: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087] test_smbstatus.sh:135:22: 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/source3/script/tests/test_smbstatus.sh b/source3/script/tests/test_smbstatus.sh index b24fe735aa5..30ca2398fa1 100755 --- a/source3/script/tests/test_smbstatus.sh +++ b/source3/script/tests/test_smbstatus.sh @@ -75,7 +75,7 @@ EOF return fi - echo "$out" | grep "$userid[ ]*DENY_NONE" + echo "$out" | grep "${userid}[ ]*DENY_NONE" ret=$? if [ $ret != 0 ]; then echo "Failed to find userid in smbstatus locked file output" @@ -132,7 +132,7 @@ EOF return fi - echo "$out" | grep "$USERNAME[ ]*DENY_NONE" + echo "$out" | grep "${USERNAME}[ ]*DENY_NONE" ret=$? if [ $ret != 0 ]; then echo "Failed to find userid in smbstatus locked file output"