Source-Changes archive

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

Re: CVS commit: src/bin/sh



In article <20040608171531.GM1582%snowdrop.l8s.co.uk@localhost>,
David Laight <david%l8s.co.uk@localhost> wrote:
>On Tue, Jun 08, 2004 at 03:29:51AM +0000, Christos Zoulas wrote:
>> 
>> Module Name: src
>> Committed By:        christos
>> Date:                Tue Jun  8 03:29:51 UTC 2004
>> 
>> Modified Files:
>>      src/bin/sh: expand.c
>> 
>> Log Message:
>> "for i in ${x-a b c}; do echo $i; done" should print "a\nb\nc\n" not "a b 
>> c\n"
>> like other shells do. mark the expansion for ifs splitting. XXX: linux has a
>> very complicated fix for this. I wonder why.
>
>Having discovered the same fix last night, I was wondering if the result
>should be affected by quoting inside the {}.
>ie what should "for i in ${x-'a b' c}; do echo $i; done" generate?

a b
c

bleh.

This is the answer to my question above :-) My fix produces

a
b
c

which is wrong.

christos



Home | Main Index | Thread Index | Old Index