in reply to Re^2: what's the difference between "$@" and ${1+"$@"}
in thread what's the difference between "$@" and ${1+"$@"}

From the manual,

If the colon (:) is omitted from the above expressions, the shell only checks whether parameter is set or not.

  • Comment on Re^3: what's the difference between "$@" and ${1+"$@"}

Replies are listed 'Best First'.
Re^4: what's the difference between "$@" and ${1+"$@"}
by cadphile (Beadle) on Oct 11, 2007 at 22:39 UTC
    Aha! Now it makes sense. Thanks everyone, especially Merlin, for your imparted wisdom...

    And I finally found a web page that discusses this, with some good background detail.

    http://www.in-ulm.de/~mascheck/various/bourne_args

    As an interesting side note, I wonder if anyone knows how to give this string (${1+"$@"}) to Google's search engine. As is, it doesn't work. I tried single-quoting it, and it still doesn't work.

    Cadphile...