Bash-script – doesn't work in a launcher
Avi Greenbury
lists at avi.co
Sat Dec 31 18:17:21 UTC 2011
Johnny Rosenberg wrote:
> Still I wonder why it worked with the #!/bin/bash line not at the top
> when I ran it from a terminal, should it really…? Maybe because bash
> is default in a terminal?
Exactly. When you don't specify an interpreter to use, generally the
current shell is used, which is probably bash.
A line beginning #! anywhere other than the top of the script is simply
a comment; there's nothing parsing it to work out what to do.
--
Avi
More information about the ubuntu-users
mailing list