bug-bash
[Top][All Lists]
Advanced

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

Re: difference between ${1+"$@"} and "$@"?


From: Greg Wooledge
Subject: Re: difference between ${1+"$@"} and "$@"?
Date: Thu, 26 Aug 2010 12:20:21 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Aug 26, 2010 at 11:13:21AM -0500, E R wrote:
> With bash is there any difference between the expressions ${1+"$@"} and "$@"?

No.

> Is there any difference with other sh-like shells?

In some Bourne shells, "$@" with an empty set of positional parameters
may expand to a single empty words, instead of no words at all.  Hence
the ${1+"$@"} workaround for ancient shells.



reply via email to

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