标签:style blog color ar for sp div on log
for var in con1 con2 con3 ... do # 执行内容 done
for var in {min..max} do # 执行内容 done
for (( 初始值; 限制值; 步阶 )) do # 执行内容 done
echo "$# parameters" for p in "$@" do echo "$p" done
user@ae01:~$ sh ./test.sh 1 "2 3" 2 parameters 1 2 3 user@ae01:~$
for p in {1..5} do echo "$p" done
user@ae01:~$ ./test.sh 1 2 3 4 5
user@ae01:~$
for ((i=1; i<=5; i++)) do echo $i done
user@ae01:~$ ./test.sh 1 2 3 4 5 user@ae01:~$
for i in `seq 1 5` do echo $i done
user@ae01:~$ ./test.sh 1 2 3 4 5 user@ae01:~$
标签:style blog color ar for sp div on log
原文地址:http://www.cnblogs.com/tannerBG/p/4056881.html