Re: bash: WHY???

From: Stuart Lamble (7d3-4-09@carousel.its.monash.edu.au)
Date: 04/09/03


From: Stuart Lamble <7d3-4-09@carousel.its.monash.edu.au>
Date: 8 Apr 2003 22:34:55 GMT

In article <b6v6bq$9q5$1@eeyore.INS.cwru.edu>, Chet Ramey wrote:
> In article <slrnb926r2.2pek.phil+s3@bolthole.com>,
> Philip Brown <phil+s3@bolthole.no-bots.com> wrote:
>>[Note: I'm using "POSIX-compliant" to mean "support all functions
>> of POSIX, and ***only*** POSIX functions]
>
> Bash has never claimed to do this, and never will. Nobody wants a shell
> with only POSIX functionality. POSIX compliance means that posix scripts --
> scripts written using the documented POSIX features -- will run
> correctly, not that these documented features are all that's available.

The trouble with that is easily explained. I write a shell script that
is supposed to be portable to other Unix systems. I set it up so that it
uses #!/bin/sh as its magic line. I only have a Linux system to test it,
so I test it on that Linux system. It works. I assume that it will
therefore work on other Unix systems, and ship it.

Then I start getting the bug reports from users of Solaris, Tru64,
HP-UX, AIX, etc., saying that it doesn't work. The more clueful bug
reports point out the bash-isms in the script.

In my case, I have access to Solaris and Tru64 (and a couple of Irix)
boxen, so I can test for this sort of stuff without too much trouble.
But for the average n00bie, all that is available for Linux.

It was a source of never ending aggravation for me whilst I was running
OpenBSD on my desktop[1] -- and when I'm trying to get stuff to run on
my Mac -- that far too many programmers assume that Linux is the world.
Don't document your software as "Unix" when it only runs cleanly out of
the box on Linux! I don't have the time to track down and fix every
Linux-ism if I need a particular package to run on a non-Linux OS. This
is getting off-topic, but it's a greater example of exactly what we're
talking about -- the assumption that Linux is the world, and that Linux
is all that matters. IT ISN'T.

[1] I had an overseas holiday, and wanted to be able to log in safely
    from Internet cafes. The easiest way to do that was to use OPIE.
    Linux's support for OPIE is patchy at best; I felt the quickest
    solution was to install one of the BSDs, which have OPIE built in.

-- 
My Usenet From: address now expires after two weeks. If you email me, and
the mail bounces, try changing the bit before the "@" to "usenet".


Relevant Pages

  • Re: Does anyone else think Wolfram Research are unfair to Unixusers?
    ... CFD, wastewater process ... I understand where you are coming from, but long long ago Unix systems came with a C compiler so one could produce ones own code. ... Now of course things have changed around again, with gcc being free on any platform, Sun Studio 12 free on Linux and Solaris. ...
    (sci.math.symbolic)
  • Re: GNOME or KDE
    ... One is a intuitive easy to use desktop manager for Linux and UNIX systems. ... One is built with Qt as the underlying libraries. ...
    (alt.os.linux.suse)
  • Re: Why I use Linux
    ... > system) to stop naive users from becrufting it. ... > That's how UNIX systems have worked for years. ... > at the supermarket, with Linux installed, and they will expect it to be ... it does is ask you for the root password and then does the work for you, ...
    (comp.os.linux.setup)
  • Re: Why I use Linux
    ... > system) to stop naive users from becrufting it. ... > That's how UNIX systems have worked for years. ... > at the supermarket, with Linux installed, and they will expect it to be ... it does is ask you for the root password and then does the work for you, ...
    (comp.os.linux.misc)
  • Re: Why newbies dont RTFM...
    ... Even though I've used Linux before, I've never had to do any ... > BASH BUILTIN COMMANDS ... > last command exited within ... > unless the shell is not exeâ ...
    (comp.os.linux.misc)

Loading