Quoting Linda Walsh <suse(a)tlinx.org>rg>:
But the problem is what Ruediger Meier wrote -- if
invoke the user's shell the way it is in their /etc/passwd (or in
their SHELL --
usually the same), then you are changing the user's default shell with which
such scripts are executed.
*IF* I put in #!/bin/bash at the beginning, then the
correct shell is used,
but by default, it should use the same shell as what the user is
when they type the name of the shell script.
It would be like developing a shell script, then when I put it in a file and
execute it (w/o any header line), someone chose to run a #/bin/python on my
script instead of the shell I was using.
Whereas I sort of understand your point (I hope), I also have to say
that 'not specifying' the she-bang would leave you in a much worse
situation, as a user NOT running bash (but maybe ash, zsh, csh), would
execute your script and then fall flat on his nose... because the
script requires bash to execute (due to bashism).
Would be as bad as writing python code and hoping that bash knows what
to do with it when not specifying the interpreter.
To unsubscribe, e-mail: opensuse-factory+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-factory+owner(a)opensuse.org