Bash中的$符号

脚本名称:$0

PID:$$

参数个数:$#

脚本返回值:$?

第x个参数:$x

第10个以上的参数加大括号:${10}

所有参数:$@

 #!/bin/bash
echo "The program $0 is now running"
echo "The progress PID is $$"
echo "The last progress PID is $$"
echo "The number of parameter is $# "
echo "The return code of last command is $?"
echo "The first parameter is $1"
echo "The second parameter is $2"
echo "The parameters are: $*"
echo "Again, the parameters are: $@"
上一篇:数据导出至Excel文件--好库编程网http://code1.okbase.net/codefile/SerializeHelper.cs_2012122018724_118.htm


下一篇:break,continue,return 区别