[12986] in Athena Bugs
Re: rsaix 7.7F: Cygnus gcc & Ted
daemon@ATHENA.MIT.EDU (John Hawkinson)
Mon Dec 5 12:03:38 1994
To: "Theodore Ts'o" <tytso@MIT.EDU>
Cc: bugs.raeburn.bug-gnu@MIT.EDU
In-Reply-To: Your message of "Mon, 05 Dec 1994 11:12:47 EST."
<199412051612.LAA00268@rsx-11.mit.edu>
Date: Mon, 05 Dec 1994 12:00:26 EST
From: John Hawkinson <jhawk@MIT.EDU>
Ted, quoting me:
> Can be replaced by the Bourne shell construction:
>
> $0.real {$1-"@$"}
Open mouth, insert foot: That should be ${1-"$@"}, which indeed breaks
under Linux's bash. However, ${1+"$@"} seems to work fine under that
bash...
Interestingly enough, this also shows up under Solaris bash from the
gnu locker -- presumably this is a generic bash bug?
>bash. Which is why it's probably less-than-commonly-known. I don't
>know about portable, though.....
Well, it worked on all the Athena platforms :-)
I've tested the + version under Solaris 2.3, Linux 1.1.64 (I've no
idea what dist...), AIX whateveritis, and--*ouch*. It seems that
under SunOS 4.1.3 and under Ultrix, and probably other good
BSD children,
When the script is called as:
script "" foo
It is interpreted as
script foo
Sigh...back to the drawing board...
--jhawk