Re: [OT] punctuation (was Re: Configuring w3m for Mozilla)
On Sat, Sep 21, 2002 at 03:58:30PM +0200, Preben Randhol wrote:
> Colin Watson <firstname.lastname@example.org> wrote on 21/09/2002 (15:55) :
> > I regard portable scripts as ones that work on systems other than
> > Debian. In particular, I need that condition in my work environment.
> > Also the script above has a bug that as far as I can tell can't be
> > fixed properly without a complete rewrite (#94507).
> ok so if I write a script I must spesify that it should be either ash or
No, the best thing to do for portable scripts is to specify /bin/sh and
use only standardized syntax. (Unfortunately the POSIX sh specification
is payware ... but SUSv2 at least comes close.)
Many systems don't have either ash or bash. Some that do don't have them
in /bin, so you can't just say '#! /bin/bash', and the #! executable
interpreter mechanism doesn't search the $PATH. /bin/sh is really all
you can rely upon there.
> Do all versions of these provide command -v with the same
Possibly. It's hard to tell as 'command -v' is an extension to POSIX,
not in POSIX sh itself.
> Partability between UNIXes is not easy at all as most of the time the
> commands take different flags so you need to make versions for the
> different flavours.
That's why standards are there. Coming up with versions for different
Unix flavours should be avoided where possible - it quickly turns into a
Colin Watson [email@example.com]