shell中的for,while及until循環

for循環 for循環會遍歷值列表,只要還在其範圍內,就會一直執行循環體內的內容,直至遍歷完成,所以for循環適合用於已知循環次數的情況 用法: for var in list do commands done 例1:遍歷數字 #!/bin/bash for test in 1 2 3 4 5 6 7 8 9 10 do echo The next number is $test don
相關文章
相關標籤/搜索