From: brian Date: Fri, 21 Oct 2005 22:33:34 +0000 (+0000) Subject: Array element access in bash MUST be enclosed with {}. X-Git-Tag: v1_7_100~584 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=d5adc37bad1944c73080048a9a157780282a1227 Array element access in bash MUST be enclosed with {}. --- diff --git a/lustre-iokit/sgpdd-survey/sgpdd-survey b/lustre-iokit/sgpdd-survey/sgpdd-survey index 16709e3..135a87e 100755 --- a/lustre-iokit/sgpdd-survey/sgpdd-survey +++ b/lustre-iokit/sgpdd-survey/sgpdd-survey @@ -43,7 +43,7 @@ i=0 devs=() for d in $scsidevs; do devs[$i]=`sg_map | awk "{if ($ 2 == \"$d\") print $ 1}"` - if [ -z "$devs[$i]" ]; then + if [ -z "${devs[$i]}" ]; then echo "Can't find SG device for $d" exit 1 fi