help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Brace expansion with empty args


From: Chet Ramey
Subject: Re: [Help-bash] Brace expansion with empty args
Date: Tue, 25 Jun 2013 10:35:52 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

On 6/14/13 8:57 AM, Roman Rakus wrote:
> On 06/14/13 14:32, Greg Wooledge wrote:
>> That's not correct.  There's no word splitting of the results.
> I think it is correct, but maybe we didn't understand each other.
>>
>> imadev:~$ printf '<%s> ' {,c}; echo
> so two steps:
> 1) {,c} converted to <null string> and c separated by space
> 2) <null string> c undergo word splitting and result is: c
>> <c>
> Here you see it

This is more or less true, except it's not technically word splitting,
since word splitting is really only applied to the output of the other
expansions.  Think of it as basically equivalent to expanding $x when
x is not set.

Chet

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



reply via email to

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