Shell解释语言,脚本语言,有多个版本
1,echo
arg1=$1
arg2=$2echo 'arg1'$arg1echo arg2 isecho $arg22,读参数
arg1=$1
arg2=$2echo 'arg1'$arg1echo arg2 isecho $arg23.for语句
#declare a
for a in 1 2 3
do
echo $a
done
----
for day in Monday Wednesday Firday Sunday; do echo $day ; done
4,while语句
declare b=2
while test $b -gt 0
do
echo $b
let b=$b-1
done
while [ $b -lt 2 ]
do
echo $b
((b++))
done