echo echo "number of variables is:$#" echo "the first variable is: $1" echo "the second is: $2" echo "the scrip's name is: $name" echo "the script's PID is: $$" echo "the parameters are: $@" echo "the parameter list is: $*" echo "show script stat: $?" echo
执行结果:
1 2 3 4 5 6 7 8 9 10
[root@localhost mountTest]# ./VariablesTest.sh
number of variables is:0 the first variable is: the second is: the scrip's name is: VariablesTest.sh the script's PID is: 4829 the parameters are: the parameter list is: show script stat: 0