> cat foo
echo wat
> ./foo
Failed to execute process './foo'. Reason:
exec: Exec format error
The file './foo' is marked as an executable but could not be run by the operating system.
It does however work in Bash. So this appears to be a bash-ism, rather than an OS feature.