while [condition] dodone关键字break跳出循环,continue跳过循环的余下部分。
for var in ...;do...done
示例:
#!/bin/bash for var in A B C;do echo "var is $var" done