${(Q)…}
: Remove one level of quotes
Q
removes one level of quotes from the resulting words.
Links
Examples
- Remove quotes
- Output:
1 2 3 4 5 6
double_quoted="\"'double quoted string'\"" echo ${double_quoted} # remove one level of quotes echo ${(Q)double_quoted} # remove two levels of quotes echo ${(Q)${(Q)double_quoted}}
1 2 3
"'double quoted string'" 'double quoted string' double quoted string
BashSupport Pro 是一款支持 Q** 的 **Zsh 集成开发环境 - 立即试用!