On 10/29/17 10:34 PM, Clark Wang wrote:
> See following example:
> 
> [STEP 100] # echo $BASH_VERSION
> 4.4.12(2)-release
> [STEP 101] # v=\'\'
> [STEP 102] # printf '%q\n' "$v"
> \'\'
> [STEP 103] # printf '%s\n' "${v@Q}"
> ''\'''\'''
> [STEP 104] #

This is an effect of using single quotes in the @Q operator. If you want
to single-quote a string containing single quotes, this is how you do it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to