bug-bash
[Top][All Lists]
Advanced

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

Re: bash doesn't act like mksh at all


From: Andres Perera
Subject: Re: bash doesn't act like mksh at all
Date: Mon, 28 Feb 2011 07:47:12 -0430

On Mon, Feb 28, 2011 at 7:41 AM, Chris F.A. Johnson
<chris@cfajohnson.com> 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
>>
>> here bash treats unquoted $@ on rhs differently, expanding it like $*:
>
>   Unquoted $@ *is* the same as $*.

you're not reading

unquoted assignments should not apply IFS to $@

>
> --
>   Chris F.A. Johnson, <http://cfajohnson.com/>
>   Author:
>   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
>   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
>



reply via email to

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