News for hackers. Stuff that matters.
Re:On env Shebangs by derefr on Saturday April 16, 2022 @12:26AM (#31049472)
> An absolute path is going to assume others have the same setup.

Certain absolute path locations are standardized by POSIX. Including the absolute path of /usr/bin/env.

> and that the program might be a different version than expected (which an absolute path doesn't solve either).

...and those programs in those standard locations are required by those same standards to behave ABI-compatibly with their behavior at time of standardization.

Which is why e.g. /bin/bash bothers to strip out features when called as /bin/sh — the interpreter at /bin/sh must be no less and no more than the particular feature-set of the Bourne shell version that POSIX was standardized upon.

There are no comments on this comment yet.