On 7/29/11 8:54 PM, Christopher Down wrote:
> Hi,
> 
> Is backslash interpretation when being generated through brace
> expansion intended functionality? I mean sure, brace expansion happens
> first, but this seems kind of unintuitive.
> 
> $ printf '<%q>' {A..z}
> <A><B><C><D><E><F><G><H><I><J><K><L><M><N><O><P><Q><R><S><T><U><V><W><X><Y><Z><\[><''><\]><\^><_><\`><a><b><c><d><e><f><g><h><i><j><k><l><m><n><o><p><q><r><s><t><u><v><w><x><y><z>
> 
> The character between [ and ] should be 5C ($'\134'), '\'.

The relevant word, when it's returned from brace expansion, is '\'.  The
single unquoted backslash is removed by word expansion, leaving an empty
word, before the printf builtin is invoked.

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

Reply via email to