|
|
|
|
|
by vbezhenar
1443 days ago
|
|
It seems to be a convention those days to use `#!/usr/bin/env sh`. At least it's a single entry point. Why can't we just write `#!sh` I never understood. Another interesting snippet from your link: "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)." So there could be systems which does not support shebang yet claiming to be POSIX? |
|
It's because #! is handled by the kernel, but the process environment is not parsed by the kernel.