NList=(5)
VList=(1)
FList=("input/flower1.jpg" "input/flower2.jpg" "input/flower3.jpg" "input/flower4.jpg")
IList=("320X240" "640X480" "1280X960" "1920X1200")
SList=(2 3)
for VM in ${VList[@]}; do
for ((index=0; index < ${#FList};)) do
file=$FList[$index]
image_size=$IList[$index]
width=`echo $image_size|cut -d "X" -f1`
height=`echo $image_size|cut -d "X" -f2`
for scale_factor in ${SList[@]}; do
for users in ${NList[@]}; do
echo "V: $VM, " "F: $file, " "S: $scale_factor, " "I: $width $height , " "N: $users"
for i in `seq 1 $users` ; do
./sr_run_once.sh $file $width $height $scale_factor &
done
wait
done # for users
done # for scale_factor
done # for index
done # for VM
exit 0
我想的是,Flistsay flower1應的320*240
只是過程的圖像尺寸,因此引入了可變折射率地圖我的變量的指標......但無法得到它的竅門。它給出了一個錯誤。我想在bash
'IFS = X讀取寬度高度<<<「$ IMAGE_SIZE」'應努力設置這些變量,雖然你想驗證之前'bash' 4.3 ,當爲這條字符串讀取的命令設置'IFS'時修正了一些錯誤。 – chepner 2014-12-08 14:44:59