1. Internal parameters
The above process is an internal variable, which is required to represent the program itself, and $ $ is optional. The same internal variables as $ A are as follows.
$#----The total number of parameters passed to the program is $? ----The previous code or shell program exits in the shell, returns 0 if normal exits, or a non-0 value. $*----A string that consists of all the arguments passed to the program. $----- provide the option $ when the shell starts or uses the SET command? -------- The current shell's process number $! ------------ positional parameter value, N for position $0 ----Current shell name
2. Quotation marks
Single quotes: Turns off all special symbols used and interpreted in the shell, that is, the contents of single quotes are all used and interpreted in terms of ordinary characters, whether special characters $ or escaped characters Fu Di quotes: Close most of the special symbols in the shell, but some reservations, such as $, escape characters \ (not included, \ t, etc.), anti-quote characters, and so on. The single quote character is used as a normal character in double quotes, and does not function as above. Reverse quotation marks: command substitution, which executes the string as a shell command, and returns the execution result of the command. and the symbol $ () in the same role.
Shell Script-tips