本文属于<Linux Shell 系列教程>文章系列,该系列共包括以下 18 部分: Linux Shell系列教程之(一)Shell简介 Linux Shell系列教程之(二)第一个Shell脚本 Linux Shell系列教程之(三)Shell变量 Linux Shell系列教程之(四)Shell注释 Linux Shell系列教程之(五)Shell字符串 Linux Shell系列教程之(六)Shell数组 Linux Shell系列教程之(七)Shell输出 Linux Shell系列
学习Linux Shell知识,就来Linux大学网(Linuxdaxue.com)! 本系列适合Linux初学者,属于Linux入门级教程,主要介绍了Shell的分类.语法格式以及脚本的使用和编写格式等. 不断更新中,是Shell学习的必读经典教程. 现主要包含以下文章: Linux Shell系列教程之(一)Shell简介 Linux Shell系列教程之(二)第一个Shell脚本 Linux Shell系列教程之(三)Shell变量 Linux Shell系列教程之(四)Shell注释 L
Linux shell脚本编程 流程控制: 循环语句:for,while,until while循环: while CONDITION; do 循环体 done 进入条件:当CONDITION为“真”: 退出条件:当CONDITION为“假”: while CONDITION; do 循环体 控制变量的修正表达式 done 示例:求100以内所有正整数之和; #!/bin/bash # declare -i sum=0 declare -i i=1 while [ $i -le 100 ]; d