文章分类 -  shell

常用shell脚本及编写
摘要:Bash循环定义无限while循环 (2018-08-17 14:00:26) 转载▼http://blog.sina.com.cn/s/blog_6436b8ec0102xfyb.html 定义一个无限while循环可以使用如下3种命令:true命令 :不做任何事,表示成功,总是返回退出状态码0。 阅读全文
posted @ 2019-11-20 11:27 klandehu 阅读(708) 评论(0) 推荐(0)
摘要:Linux下Shell的for循环语句 第一类:数字性循环 for1-1.sh #!/bin/bash for((i=1;i<=10;i++)); do echo $(expr $i \* 3 + 1); done for1-2.sh #!/bin/bash for i in $(seq 1 10) 阅读全文
posted @ 2019-11-16 10:23 klandehu 阅读(174) 评论(0) 推荐(0)