Home > Web Front-end > JS Tutorial > body text

Explanation of how to use $ in shell

小云云
Release: 2018-02-26 14:05:23
Original
2236 people have browsed it

Explanation of the meaning of shell variables $#,$@,$0,$1,$2 in Linux:
Variable description:
$$
Shell’s own PID (ProcessID)
$!
The PID of the background Process that Shell last ran
$?
The end code (return value) of the last command run
$-
List of Flags set using the Set command
$*
All parameter list. If "$*" is enclosed in """, all parameters will be output in the form of "$1 $2 ... $n".
$@
All parameter list. For example, if "$@" is enclosed in """, all parameters will be output in the form of "$1" "$2" ... "$n".
$
#The number of parameters added to the Shell
$0
The file name of the Shell itself
$1~$n
The value of each parameter added to the Shell. $1 is the first parameter, $2 is the second parameter…. ​

The above is the detailed content of Explanation of how to use $ in shell. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template