[Top][All Lists]

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

Re: [Groff] Typesetting with groff from Makefiles

From: Keith MARSHALL
Subject: Re: [Groff] Typesetting with groff from Makefiles
Date: Tue, 21 Jun 2005 14:25:52 +0100

> But `false' is part of POSIX.  That should be enough.
> You cannot use the original Bourne style for much; it does not
> even have shell functions.

Depends on your requirements, and how portable you want to keep
your script.  You *cannot* blindly rely on POSIX, as there are
still many platforms which don't conform.

You *can* do a lot with old Bourne shell, even without POSIX
conformance.  Autoconf's texinfo documentation includes a fairly
comprehensive guide to writing portable shell scripts, and that
*definitely* does *not* suggest that it's ok if POSIX has it!

Even without POSIX conformance, many old Bourne shells *did*
support functions -- you had to write them...

     body commands

(you couldn't use the POSIX `function' keyword).  True, there may
be some *very* old Bourne shells, which don't support functions at
all, but even excluding these, with care it is possible to write
Bourne shell scripts which are *significantly* more portable than
would be the case if you always relied on POSIX conformance.  For
maximum portability, you have to write to the lowest common
denominator, and I'm afraid that isn't POSIX.

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]