shell --for双括号循环
1 #!/bin/bash 2 # for控制测试 3 4 for str in "zhangsan" "lisi" "wangwu" 5 do 6 echo $str 7 done 8 9 for ((i=0;i<=5;i++)) 10 do 11 echo $i 12 done
1 #!/bin/bash 2 # for控制测试 3 4 for str in "zhangsan" "lisi" "wangwu" 5 do 6 echo $str 7 done 8 9 for ((i=0;i<=5;i++)) 10 do 11 echo $i 12 done