[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [EVEN MORE OFFTOPIC] Re: /etc/shells management

On 09-Sep-03, 11:56 (CDT), Andrew Suffield <asuffield@debian.org> wrote: 
> On Tue, Sep 09, 2003 at 08:51:16AM -0500, Steve Greenland wrote:
> > Just to nitpick, I don't think that Sun claims /bin/sh is a POSIX. At
> > least in Solaris 8 (I don't have a 9 system handy), it's not even close.
> > One has to /usr/xpg4/bin/sh to get POSIX.
> I'm not sure that anything other than recent Debian claims /bin/sh is
> a POSIX shell. That always seemed like a somewhat silly idea to me.

I won't make any claims about actual POSIX tested compliance, but
it's been a while since I worked on a system whose /bin/sh *wasn't* a
reasonable facsimile of ksh.


Except Solaris, whose /bin/sh doesn't support ~. Or aliases. Or brace
expansion. Or the pattern matching expansions (i.e. ${VAR%foo} and
friends). Or return outside of functions. Or shell arithmetic with let.
Or '-p' for prompting on read. Etc. and so forth.

Of course, some of these are really only important for interactive
use, and we can use /usr/xpg4/bin/sh or install bash for that. And you
can work around the limited features in scripts, if you know you have
to. But it makes the code uglier, and it's easy to slip a kshism into
the script and not find out until testing later on Solaris, which is
annoying and tedious.

And why? Because Sun is too damned lazy to update its startup scripts.
Okay, it might also break a few customer scripts, that's why you have
a transistion period, and warn people, and so on and so forth. But
the other vendors managed this years ago, and we're still having to
dick around to support Sun's ancient /bin/sh in 2003. And when did the
POSIX.2 come out, which said (summarized) /bin/sh==ksh? 1988, right?
*FIFTEEN* years ago.

Not to mention all the other non-POSIX crap in /bin. That's easy enough
to fix with a PATH setting. But why do I have to? And PATH doesn't help
with '#!/bin/sh'.


Yes, I know this has nothing to do with Debian-devel. Read the Subject:
again, and quit yer bitchin': you were warned.


Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net

Reply to: