On Thu, Jun 05, 2008 at 05:39:58PM +0100, Stephane Chazelas wrote:
[...]
> $ bash -c 'printf "%s\n" "${@:2}"' x 1 2 "3 4" 5
> 2
> 3 4
> 5
> $ bash -c 'IFS=a; printf "%s\n" "${@:2}"' 0 1 2 "3 4" 5
> 2 3 4 5
> 
> I don't understand why $IFS would have any influence here. The
> behavior differs from ksh.
> 
> It seems that you need to have " " in IFS or IFS being unset for
> it to work as I would expect.
[...]

It's the same for "${@//a/b}":

$ bash -c 'printf "<%s>\n" "${@//a/b}"' x a b c
<b>
<b>
<c>
$ bash -c 'IFS=a; printf "<%s>\n" "${@//a/b}"' x a
b c
<b b c>

-- 
Stéphane


Reply via email to