Say I have a file hello:
#!/bin/sh echo "Hello World!"
Provided the executable bit is set on that file, I can execute it by entering its path on the prompt:
$ ./hello Hello World!
Is there a more explicit equivalent to the above? Something akin to:
$ execute hello
I know I can pass hello as an argument to
/bin/sh, but I'm looking for a solution that automatically uses the interpreter specified in the shebang line
My use case for this is to execute script files that do not have the executable flag set. These files are stored in a git repository, so I would like to avoid setting their executable flag or having to copy them to another location first.