[Haskell-cafe] [offtopic] UNIX Shell (was: GHC RTS question)

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Wed Feb 24 12:47:01 EST 2010

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 at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100224/852dcecb/PGP.bin

More information about the Haskell-Cafe mailing list