Hacker News new | past | comments | ask | show | jobs | submit login

If /bin/sh does not exist, what in the world is executing the shell script?



The shell, of course. It just might not be (because it doesn't have to be) located in /bin.


Iā€™m pretty sure that /bin/sh is mandated by POSIX.


It's not. See https://pubs.opengroup.org/onlinepubs/9799919799/utilities/s...

    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.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: