Re: bash doesn't act like mksh at all

2011-03-05 Thread Sven Mascheck
On Mon, Feb 28, 2011 at 07:47:12AM -0430, Andres Perera wrote: > unquoted assignments should not apply IFS to $@ BTW, out of plain curiosity http://www.in-ulm.de/~mascheck/various/ifs/ lists some existing implementations.

Re: bash doesn't act like mksh at all

2011-03-03 Thread Chet Ramey
On 2/28/11 6:45 AM, Andres Perera wrote: > for i in bash mksh; do > echo $i: > $i <<'!' > set 'a b' 'c d' > quoted="$@" > unquoted=$@ > echo "$quoted" > echo "$unquoted" > ! > done > > here bash treats unquoted $@ on rhs differently, expanding

Re: bash doesn't act like mksh at all

2011-02-28 Thread Chet Ramey
> for i in bash mksh; do > echo $i: > $i <<'!' > set 'a b' 'c d' > quoted="$@" > unquoted=$@ > echo "$quoted" > echo "$unquoted" > ! > done > > here bash treats unquoted $@ on rhs differently, expanding it like $*: Thanks for the report. I'll

Re: bash doesn't act like mksh at all

2011-02-28 Thread Andreas Schwab
"Chris F.A. Johnson" writes: > On Mon, 28 Feb 2011, Andres Perera wrote: > >> for i in bash mksh; do >>echo $i: >>$i <<'!' >>set 'a b' 'c d' >>quoted="$@" >>unquoted=$@ >>echo "$quoted" >>echo "$unquoted" >>! >> done >> >> here bash treats unq

Re: bash doesn't act like mksh at all

2011-02-28 Thread Andres Perera
On Mon, Feb 28, 2011 at 7:41 AM, Chris F.A. Johnson wrote: > On Mon, 28 Feb 2011, Andres Perera wrote: > >> for i in bash mksh; do >>   echo $i: >>   $i <<'!' >>       set 'a  b' 'c  d' >>       quoted="$@" >>       unquoted=$@ >>       echo "$quoted" >>       echo "$unquoted" >>   ! >> done >> >>

Re: bash doesn't act like mksh at all

2011-02-28 Thread Chris F.A. Johnson
On Mon, 28 Feb 2011, Andres Perera wrote: for i in bash mksh; do echo $i: $i <<'!' set 'a b' 'c d' quoted="$@" unquoted=$@ echo "$quoted" echo "$unquoted" ! done here bash treats unquoted $@ on rhs differently, expanding it like $*: Unquoted $@

bash doesn't act like mksh at all

2011-02-28 Thread Andres Perera
for i in bash mksh; do echo $i: $i <<'!' set 'a b' 'c d' quoted="$@" unquoted=$@ echo "$quoted" echo "$unquoted" ! done here bash treats unquoted $@ on rhs differently, expanding it like $*: bash: a b c d a b c d mksh: a b c d a b c d p