Linux操作系统之第4章.ppt

Linux操作系统之第4章分析

例 #!/bin/bash for file in *.txt do if test –f $file then echo ----------------------------------------------------- echo $file echo -----------------------------------------------------“ cat $file fi done #end #!/bin/bash for p in 1 2 3 4 5 do echo $p done #end #!/bin/bash for ((p=1; p6; p++)) do ??? echo $p done #end 例: #!/bin/bash #This is example 3 about for. sum=0 for p in $* do let sum=$sum+$p done echo the total is $sum #end While循环

文档评论(0)

1亿VIP精品文档

相关文档