Fork me on GitHub

and 命令

if  [   A  -a   B ]

then

else

fi

 

while [ ]

do

done 

 

set command

set  these are parameters

$1

set

 

strings

str="A is a"

echo "$str"

 

a=30 b=15
echo `expr $a + $b`
echo `expr $a - $b`
echo `expr $a \* $b`
echo `expr $a / $b`
echo `expr $a % $b`

a=`expr $a+1` 

 

The Internal Field Separator

IFS=: 

set ":" as field separator S1:S2:...

 

 break continue the same

 

 function

# test function. test.sh

func()

{

   echo $1

}

.  test.sh

func a b 1 3

 

 

 

 

posted on 2014-05-25 15:57  huashiyiqike  阅读(280)  评论(0编辑  收藏  举报