On Sun, 31 Oct 2021 10:02:20 +0100 Andreas Kusalananda Kähäri <andreas.kah...@abc.se> wrote:
> It doesn't say anything about #! in shell scripts and it say nothing > about the location of the sh shell interpreter or the existance of > the /bin directory. "It's very provoking to be called an egg ? very!" -- Humpty Dumpty You must be referring to https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html "Applications should note that the standard PATH to the shell cannot be assumed to be either /bin/sh or /usr/bin/sh, and should be determined by interrogation of the PATH returned by getconf PATH, ensuring that the returned pathname is an absolute pathname and not a shell built-in." I'm sure I've read 100 times that a standards-compliant system will have /bin/sh installed. Reading the above, at least as far as Posix is concerned, there is no way for me on my machine to know where you on your machine stashed your shell, and consequently no way to write an interpreter line that's perfectly portable. It's carefully written to prioritize neither chicken nor egg. <shrug> --jkl