История изменений
Исправление beastie, (текущая версия) :
man sh:
If the program is not a normal executable file (i.e., if it does not begin with the «magic number» whose ASCII representation is «#!», so execve(2) returns ENOEXEC then) the shell will interpret the program in a subshell.
man bash:
If the program is a file beginning with #!, the remainder of the first line specifies an interpreter for the program.
man ksh:
[…] execve(2) fails to execute and which do not start with a ``#!shell" sequence
То, что оно работает говорит только о том, что либо документация врёт, либо что это неопределённое поведение.
Исходная версия beastie, :
man bash:
If the program is not a normal executable file (i.e., if it does not begin with the «magic number» whose ASCII representation is «#!», so execve(2) returns ENOEXEC then) the shell will interpret the program in a subshell.
То, что оно работает говорит только о том, что либо документация врёт, либо что это неопределённое поведение.