From: alsor_zhou <zh...@em...> - 2005-02-17 06:48:52
|
hi, all Environment ----- ltp version: 20041007 kernel: 2.4.20 arch: arm11 When I run `export LTPROOT; ./rwtest -N rwtest01 -c -q -i 60s -f sync 10%25000:rw-sync-$$' on my target board, I met following error msgs, init-2.05a# ./rwtest -N rwtest01 -c -q -i 60s -f sync 10%25000:rw-sync-$$ start, now ./rwtest: 312: Syntax error: Bad substitution and I located the error line 312 as following contents, 306 dir=$(dirname $file) 307 size=${f%%:*} ## 10%25000, strip off the longest pattern `:*' from the back end 308 if [ $size = *%* ] # if $size has the similar format of `*%*' 309 then 310 typeset -i n=0 #declare and initialize an integer `n' with 0. 311 while [ $n -lt ${szcache[*]} ] 312 do 313 if [ szcache[$n] = $dir ]; then 314 break; 315 fi 316 n=$n+1 317 done 318 if [ $n -lt ${#szcache[*]} ] so will anybody kindly show more details to me in following aspects? 1) What is the usage of ` $size = *%*' ?( Was my comment at the end of 308 appropriate?) 2) and the `${szcache[*]}' ? I haven"t found this array being valued before using. Above script run well on x86 with bash-2.05b, so I roughly suppose it caused by the bash version. Is it true? Was there any advice ? thanks in advance. Best regards, alsor |