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: Chris F.A. Johnson
Subject: Re: bash doesn't act like mksh at all
Date: Mon, 28 Feb 2011 07:11:48 -0500 (EST)
User-agent: Alpine 2.00 (LMD 1167 2008-08-23)

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 $*.

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