正文

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)
評論
目前還沒有任何評論
登錄後才可評論.