脚本名称:$0
PID:$$
参数个数:$#
脚本返回值:$?
第x个参数:$x
所有参数:[email protected]
1 #!/bin/bash 2 echo "The program $0 is now running" 3 echo "The progress PID is $$" 4 echo "The last progress PID is $$" 5 echo "The number of parameter is $# " 6 echo "The return code of last command is $?" 7 echo "The first parameter is $1" 8 echo "The second parameter is $2" 9 echo "The parameters are: $*" 10 echo "Again, the parameters are: [email protected]"
时间: 2024-11-17 09:46:00