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

2010-08-26 Thread Eric Blake
On 08/26/2010 10:28 AM, Eric Blake wrote: 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. Versions of zsh were the most recently afflicted by this, although

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

2010-08-26 Thread Eric Blake
On 08/26/2010 10:20 AM, Greg Wooledge wrote: 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

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

2010-08-26 Thread Greg Wooledge
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,

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

2010-08-26 Thread E R
With bash is there any difference between the expressions ${1+"$@"} and "$@"? Is there any difference with other sh-like shells? Thanks, ER