On 1/22/24 8:02 AM, Oğuz wrote:
On Mon, Jan 22, 2024 at 3:25 PM Greg Wooledge <g...@wooledge.org> wrote:
But in any case, writing a "script" without a shebang and then counting
on the shell to work around the broken script is not ideal.
Unlike shebangs that behavior is standardized. Which is what I
consider ideal. Thanks for your input

For those who are wondering:

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01

"If the execl() function fails due to an error equivalent to the [ENOEXEC]
error defined in the System Interfaces volume of POSIX.1-2017, the shell
shall execute a command equivalent to having a shell invoked with the
pathname resulting from the search as its first operand, with any remaining
arguments passed to the new shell, except that the value of "$0" in the new
shell may be set to the command name. If the executable file is not a text
file, the shell may bypass this command execution. In this case, it shall
write an error message, and shall return an exit status of 126."

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to