[wellylug] Newbie starting BWBasic - Linz
Jes Hall
jes.hall at kdemail.net
Tue May 3 23:32:56 NZST 2005
> What happens if I try to run your script on my hypothetically
> different machine in a different shell, where bash might be located in
> /usr/thisisnothebinyourelookingfor/bash?
>
> Would it depend on the smarts behind the shell I'm running as to
> whether it processes it as bashscript or not?
> Is there some standard naming service which can resolve program
> locations? Do we need one?
>
> I ask this, because some people say you should obfuscate your sbin and
> bin locations for security reasons. Does this mean going through the
> headaches of failed scripts unless you're careful?
If you were for any reason needing to worry that interpreters might not be
installed into the path you're expecting, you'd usually use env. While it
would be very very silly to move sh out of /bin, if you're writing python
or perl the site administrator can put those in interesting places if they
wish. So you could use something like
#!/usr/bin/env python
and env should pass the execution of the script to the interpreter you've
specified.
More information about the wellylug
mailing list