Variable Substitution:
${variable}: Returns the value of the variable.${variable:-default}: If the variable is unset or empty, it returns the default value.Variable Assignment:
${variable=value}: If the variable is unset or empty, it assigns the value to it.${variable:=value}: If the variable is unset or empty, it assigns the value to it and expands to that value.${variable:-value}: If the variable is unset or empty, it assigns the value to it but does not expand to that value.Length:
${#variable}: Returns the length of the variable value.Substring Extraction:
${variable:start:length}: Extracts the substring from the variable value, starting at the specified index and of the specified length.${variable:start}: Extracts the substring from the variable value, starting at the specified index until the end.Pattern Matching and Removal:
${variable#pattern}: Removes the shortest match of the pattern from the beginning of the variable value.${variable##pattern}: Removes the longest match of the pattern from the beginning of the variable value.${variable%pattern}: Removes the shortest match of the pattern from the end of the variable value.${variable%%pattern}: Removes the longest match of the pattern from the end of the variable value.String Replacement:
${variable/pattern/string}: Replaces the first occurrence of pattern with string in the variable value.${variable//pattern/string}: Replaces all occurrences of pattern with string in the variable value.Default Value:
${variable:+value}: If the variable is set and not empty, it expands to the value.${variable:?message}: If the variable is unset or empty, it displays the error message and exits the script.${variable:offset}: Expands to the substring after skipping the specified offset in the variable value.Get all variables starting with U
