help-bash
[Top][All Lists]
Advanced

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

Re: Help fixing NativeMessaging host: read 32-bit message length in nati


From: Greg Wooledge
Subject: Re: Help fixing NativeMessaging host: read 32-bit message length in native byte order
Date: Sat, 24 Jun 2023 22:15:38 -0400

On Sat, Jun 24, 2023 at 06:56:54PM -0700, guest271314 wrote:
> > If you're content to require GNU tools, just say so.
> 
> I have no idea what you are specifically talking about. Sounds like
> politics.

It's not politics.  It's technology.

You're aware that dd, head, cat and most other commands are NOT part
of bash, right?  They're provided by the operating system that the
bash script runs on.

On a (non-ancient) GNU/Linux system, those three commands are provided
by the GNU coreutils project.

The GNU implementation is just one of many possible implementations.
On other systems, these tools are provided by a different set of authors,
who have no connection to the GNU project.  They may work differently.
POSIX defines a common baseline set of features that must be present, but
each implementation adds its own unique set of features on top of that.

So, when we discuss portability, there are at least two criteria involved:

 * Which shell is running the script.
 * What features are present in the external tools needed by the script.

Your bash script might run on Linux, where head comes from GNU, or it
might run on a commercial Unix system, where head comes from the operating
system's manufacturer.  In both cases, the *shell* is the same (bash),
but the underlying tool set is different.

Your script might not work as you expect on a commercial Unix system,
even if bash is installed on it.  This isn't "politics".  It's simply
reality.



reply via email to

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