Re: patch: UNIX shell script portability

Subject: Re: patch: UNIX shell script portability
From: Kevin Vajk (
Date: Thu Mar 01 2001 - 20:35:45 CST

On Thu, 1 Mar 2001, Sam TH wrote:

> Is this a bashism, or a POSIX spec that isn't being followed?

I don't know; I just wanted this patched because without the quotes it
generates a warning on HP-UX, and bash is happy in either case. The
HP-UX shell is POSIX-compliant, but then "bash --posix" probably is,
too. So, I'm guessing POSIX doesn't specify anything here.

> Also, do we need to be even more portable? I.e., do we need to do
> this autoconf style with
> test "x$foo" != "$foo"

You mean test "x$foo" != "x" right?

> or can we just not support those platforms? This question is really -
> Do any of those platforms support *any* interesting software, or can
> we just forget about them?

I think the way it is now is portable enough. If I'm wrong, it'll
be easy and obvious to change the script if and when anybody ever ports
it to a system which doesn't like the the current form. Realistically,
I don't think that's likely to happen.

- Kevin Vajk

This archive was generated by hypermail 2b25 : Thu Mar 01 2001 - 20:33:45 CST