Shell variable Handling
1. Variable deletion
${var#key} Delete the shortest match from the beginning
${var# #key} Delete the longest match from the beginning
2. Variable deletion
${var%key} Delete shortest match from tail forward
${var%%key} deletes the longest match from the tail forward
3. Variable substitution
${var/old/new} replaces the first match
${var//old/new} Replace all matches
4. Replacing and assigning values
A. ${var-init} to variable var, existence is persisted, no then assignment init
B. ${var:-init} to variable Var, a non-null value is persisted, no or null value is assigned to Init
C. ${var+expr} If the variable var does not exist, it is not assigned, and if the variable var exists, the value expr
D. ${var:+expr} if the variable var does not exist or is NULL, the value is not assigned, and if Var is a non-null value, expr is assigned
E. ${var=expr}
F. ${var:=expr}
G. ${var?expr}
H. ${var:?expr}
Shell simple Use (v) three of the variables