Special variables that come with Shell-General Linux technology-Linux programming and kernel information. The following is a detailed description. $ PATH: the search PATH of the executable file, usually/usr/bin/,/usr/X11R6/bin/,/usr/local/bin, and so on.
$ PWD: working directory (your current directory)
$ UID: User ID
$ SHLVL: Shell level, that is, the depth of Bash nesting. if it is in the command line, $ SHLVL is 1. if it is in the script, $ SHLVL is 2.
$ SECONDS: The time when the script has been run (in SECONDS ).
$ IFS: Internal Domain Separator. this variable is used to determine how Bash recognizes the domain or word boundary when interpreting strings.
$ IFS is blank (space, tab, and line break) by default, but this can be modified. for example, you can set it to a comma when analyzing data files separated by commas. note that $ * uses the first character saved in $ IFS.
$0, $1, $2,... $9: location parameter. it is passed from the command line to the script, to the function, or to the variable.
$ #: Number of command line or location parameters
$ *: All location parameters are regarded as a word.
$? : Exit status code of the command, function, or script itself (success is 0)
$: Script process ID
$! : PID (process ID) of the last job running in the background)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service