摘要:
转自:http://blog.51yip.com/shell/1132.htmlshell的循环主要有3种,for,while,untilshell的分支判断主要有2种,if,case一,for循环 #!/bin/bash for file in $(ls /tmp/test/mytest |grep sh) //for in格式是shell for的基本格式,根js的for in类似 do //循环开始你就把它当成{ echo $file done //循环结束你就把它当成} ... 阅读全文