Linux shell中的for循环用法详解
for循环有多用用法,比如:
for i in “file1” “file2” “file3”for i in /boot/*for i in /etc/*.conffor i in $(seq -w 10)–》等宽的01-10for i in {1…10}for i in $( ls )for I in $(< file)for i in “$@”–》取所有位置参数,可简写为for i
注意:bash shell支持C式for循环