
On Feb 24, 2010, at 05:19 , Roman Cheplyaka wrote:
Well, this agrees with POSIX. So still I don't see the difference between "$@" and ${1+"$@"}.
The difference is that Unix /bin/sh predates POSIX, and on systems that usefully support a notion of backward compatibility (nostly commercial, because (1) they have installed user bases that predate POSIX and (2) they actually think it's worthwhile to support said user bases) /bin/sh uses the traditional behavior that "$@" expands to "" if there are no arguments. (This is "stupid" but consistent, another concept that seems to have been thrown to the wolves.) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH