[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
printf %q represents null argument as empty string.
From: |
Dan Douglas |
Subject: |
printf %q represents null argument as empty string. |
Date: |
Fri, 11 Jan 2013 12:38:34 -0600 |
User-agent: |
KMail/4.8.3 (Linux/3.4.6-pf+; KDE/4.8.3; x86_64; ; ) |
$ set --; printf %q\\n "$@"
''
printf should perhaps only output '' when there is actually a corresponding
empty argument, else eval "$(printf %q ...)" and similar may give different
results than expected. Other shells don't output '', even mksh's ${var@Q}
expansion. Zsh's ${(q)var} does.
--
Dan Douglas
signature.asc
Description: This is a digitally signed message part.
- printf %q represents null argument as empty string.,
Dan Douglas <=
- Re: printf %q represents null argument as empty string., John Kearney, 2013/01/11
- Re: printf %q represents null argument as empty string., Dan Douglas, 2013/01/11
- Re: printf %q represents null argument as empty string., John Kearney, 2013/01/11
- Re: printf %q represents null argument as empty string., Dan Douglas, 2013/01/11
- Re: printf %q represents null argument as empty string., Dan Douglas, 2013/01/12
- Re: printf %q represents null argument as empty string., John Kearney, 2013/01/12
- Re: printf %q represents null argument as empty string., Chet Ramey, 2013/01/12
- Re: printf %q represents null argument as empty string., John Kearney, 2013/01/12