Shell解释语言,脚本语言,有多个版本
1,echo
arg1=$1
arg2=$2
echo 'arg1'$arg1
echo arg2 is
echo $arg2
2,读参数
arg1=$1
arg2=$2
echo 'arg1'$arg1
echo arg2 is
echo $arg2
3.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