- b variable is
null
the time,var=a
var=${b-a}
- When the b variable is
NULL
an empty string,var=a
var=${b:-a}
Note that when the variable is ${1-9}
time, there is no second case
Special meaning
- $$ current shell process id
- $0 Current script file name
- $# The number of parameters passed to the function or script
- ∗ or *or ∗ or @ All parameters passed to the function or script, "KaTeX parse error: Undefined control sequence: \* at position 1: \̲*̲" returns a string, "@" returns a list
- $? The exit status of the last command or the return value of the function
Reference link: http://c.biancheng.net/cpp/view/2739.html