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: $@"
05-11 08:15
查看更多