On 3/13/15 6:15 PM, isabella parakiss wrote:
> This works as I would expect:
> 
> $ arr=(a b c); IFS=+; echo "${arr[*]/a/x}"
> x+b+c
> 
> 
> But for some reason, this ignores IFS:
> 
> $ arr=(a b c); IFS=+; arr=${arr[*]/a/x}; echo "$arr"
> x b c
Because it doesn't occur within a double-quoted string.  Posix recently
(within the last few weeks) released an interpretation that extends the
double-quoted behavior of the expansion of `*' to all contexts where word
splitting does not take place:

http://austingroupbugs.net/view.php?id=888

I haven't done anything to change the bash behavior yet.

Chet

-- 
``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