${name:q}: Quote words
Escapes special characters of the variable value.
Use :x if you’d like to break into words at whitespace.
Please note that :x does not work with parameter expansion.
Links
Examples
- Quote variable value
- Output:
1 2code="echo Pattern is *.txt" echo $code:q1echo\ Pattern\ is\ \*.txt
BashSupport Pro ist eine Zsh IDE mit Unterstützung für $varName:q - probieren Sie es jetzt aus!