How can I have bash respect the shebang when passing a file as an argument?
eg: hello.py
#!/usr/bin/env python
print("Hello Python")
When passed to bash:
$ bash hello.py
hello.py: line 2: syntax error near unexpected token `"Hello Python"'
hello.py: line 2: `print("Hello Python")'
In the environment I’m using I unfortunately can’t execute hello.py directly, it has to be done by supplying args to bash.