break与continue

运行这个脚本之后,就明白了!
#!/bin/bash
for index in 1 2 3 4 5 6 7 8 9 10 do if [ $index -le 3 ] ; then echo "continue" continue fi echo $index if [ $index -ge 8 ] ; then echo "break" break fi done
 

你可能感兴趣的:(shell,职场,休闲)