1位置参数
$0------shell名字
$1------传递给shell的第一个参数
$2------传递给shell的第二个参数
……
2内部参数
$#------传递给shell的参数个数
$*------传递给shell的所有参数组成的字符串
$?------ 上一个代码或者shell程序在shell中退出的情况,正常退出返回0,反之为非0值
3循环语句
for循环
for 变量 in 列表
do
操作
done
while循环
while test 表达式
do
操作
done
until循环
until test 表达式
do
操作
done
4条件语句
if语句
if test 表达式
then 操作
elif
then 操作
...
fi
case语句
case 表达式 in
值1|值2)
操作;;
值3|值4)
操作;;
...
*)
操作;;
esac
7万+

被折叠的 条评论
为什么被折叠?



