Hello,

On Sat 19 Apr 2025 at 09:40am -04, Michael Stone wrote:

> On Sat, Apr 19, 2025 at 08:05:54PM +0800, Sean Whitton wrote:
>>I have interpreted scripts that I want to run on any FreeBSD and Debian
>>machine, because they are part of my OS bootstrapping.  What else is
>>there than POSIX sh for this?  Therefore, it's still relevant.
>
> With that requirement, what you really want to know is how to write a script
> that works on FreeBSD and Debian--which POSIX can't tell you. (Neither of
> those is POSIX certified or fully compliant.) POSIX might be a starting point,
> but you'll have to read man pages and figure out the discrepencies. If you're
> stuck doing that anyway, I seriously question the value of artificially
> limiting yourself to what unix tools did 30 or 40 years ago--newer tools or
> options often let you accomplish tasks much more efficiently. Maybe it would
> be worth avoiding those if POSIX really did let you write once and run
> anywhere...but it doesn't.

This just hasn't been my experience.  You don't need perfect
compatibility (or certification).  By restricting myself to the POSIX
specifications of sh, awk, find, grep and sed, I've profitably written
several non-trivial programs that work correctly on any FreeBSD install
and any Debian install that wasn't specifically engineered to be
minimal.

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature

Reply via email to