bash编程-循环

for

for var in item1 item2 ...itemN
do
  command1
  command2
  ...
  commandN
done

 

while

while condition
do
  command
done

无限循环

while :
do
  command
done

或者

while true
do
  command
done

或者

for (( ; ; ))

 

 

until

until condition
do
  command
done

 

 

case

...

A:  " . " 和" source" 都可以执行文件,但是 . file 和.  ./file 区别是什么,为什么他要求不可以. file这么写?  

转载于:https://my.oschina.net/u/3785630/blog/1665133

你可能感兴趣的:(bash编程-循环)