摘要: for循环 for循环语法 # 语法(shell特征:根据值进行循环) for i in 值1 值2 值3 do echo $i done 示例一:固定值循环 [root@egon day05]# cat 7.sh #!/bin/bash for i in "aaa" 222 "ccc" do ec 阅读全文
posted @ 2020-08-28 17:53 元气少女郭德纲!! 阅读(248) 评论(0) 推荐(0) 编辑
摘要: while循环 while循环语法 ` 前提: 条件为true就执行循环体代码,条件变为false循环结束 ` # 语法: while 条件 do 命令1 命令2 命令3 ... done #示例(最开始的值为0,依次循环,直到满足条件count等于或者大于5,就停止循环,停止循环的前提就是条件变成 阅读全文
posted @ 2020-08-28 17:25 元气少女郭德纲!! 阅读(1049) 评论(0) 推荐(0) 编辑