while 的使用:
#!/bin/bash
array=(chending chenhua chenhong);
echo "the member of chen"
len=${#array[*]}
index=0
while [ $index -lt $len ];do
echo "the name is ${array[$index]}"
let index++
done
while 的使用:
#!/bin/bash
array=(chending chenhua chenhong);
echo "the member of chen"
len=${#array[*]}
index=0
while [ $index -lt $len ];do
echo "the name is ${array[$index]}"
let index++
done