2 ms·
http://manpag.es/RHEL6/1p+env http://manpag.es/RHEL6/1p+env Mentions that the env command is POSIX, but it doesn't mention the absolute path. Are you saying th
by ithkuil 9y ago
http://manpag.es/RHEL6/1p+env http://manpag.es/RHEL6/1p+env
Mentions that the env command is POSIX, but it doesn't mention the absolute path. Are you saying that /use/bin/env is not POSIX because there is no guarantee that it will be available at that particular path?
- jolmg 9y agoInterestingly enough, not even the path of /bin/sh is guarenteed. From the POSIX: > 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. EDIT: I wondered what POSIX recommended to do for any use of the shebang and this is what I found: > Furthermore, on systems that support executable scripts (the "#!" construct), it is recommended that applications using executable scripts install them using getconf PATH to determine the shell pathname and update the "#!" script appropriately as it is being installed (for example, with sed). Wow.