bug-bash
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]