On Sun, Apr 11, 2021 at 1:47 PM shwaresyst via austin-group-l at The Open Group <[email protected]> wrote:
> That's bugs in those shells for POSIX mode then, that I see. The > conforming behavior is /usr/gcc is found and succeeds at doing nothing, > since it contains just a comment line. Other elements of path never get > checked. Even in non-POSIX mode, trying to process it as a shebang with > "/bad" as a ENOEXEC because not present, or other reason, does not imply > the rest of the path should be searched, it should simply return a failure > code. I agree with this. Most of those shells also hash `/bin/gcc' despite executing `/usr/bin/gcc'. This must have been discussed in #1161, but bash still seems to be the only one that fails on `/bin/gcc' and doesn't execute `/usr/bin/gcc'.
