我想迭代shell中的参数列表,我知道如何使用它
for var in $@
Run Code Online (Sandbox Code Playgroud)
但我想这样做
for ((i=3; i<=$#; i++))
Run Code Online (Sandbox Code Playgroud)
我需要这个,因为前两个参数不会进入循环.谁知道怎么做?期待你的帮助.
程
rea*_*000 10
这可能有所帮助:
for var in "${@:3}"
Run Code Online (Sandbox Code Playgroud)
有关更多信息,请查看:
http://www.ibm.com/developerworks/library/l-bash-parameters/index.html