正文

Unix shell $ variable

(2019-04-19 09:42:47) 下一个

 

$#    Stores the number of command-line arguments that       were passed to the shell program.

$?    Stores the exit value of the last command that was       executed.

$0    Stores the first word of the entered command (the       name of the shell program).

$*    Stores all the arguments that were entered on the      command line ($1 $2 ...).

"$@"  Stores all the arguments that were entered      on the command line, individually quoted ("$1" "$2" ...).

 

$$ is the process ID (PID) of the script itself. 

Note : 

"$@"  is 
individually quoted ("$1" "$2" ...).
[ 打印 ]
阅读 ()评论 (0)
评论
目前还没有任何评论
登录后才可评论.