On 10/15/05, Andrew Lentvorski <[EMAIL PROTECTED]> wrote:
> Carl Lowenstein wrote:
> > On 10/14/05, David M. Cook <[EMAIL PROTECTED]> wrote:
> >>#!/bin/sh
>
> Stylistically, I recommend:
>
> #!/bin/env sh
>
> or, more usually,
>
> #!/usr/bin/env sh
>
> unless this is an actual boot script. That way "sh" is reflected from
> your current environment rather than some funky hybrid environment that
> you then have to painstakingly debug.
>
> Similarly, I always use:
> #!/usr/bin/env perl
> #!/usr/bin/env python
>
> to avoid tying myself to a specific installation or version.
>
> > Couple of comments:
>
> > Shouldn't your script use fully qualified paths for commands it
> > invokes, or else set $PATH to fit your environment?
>
> A fully qualified PATH or a specifically set path makes the script
> completely useless for a different user, a different Linux or a
> different OS.
>
> Why in the world would you want to completely prevent the use of this
> script in a different environment?
I think this is analgous to the use of a hardware RS232 null modem
box rather than making up a special cable to hide the connections. I
would rather have the search path dependencies written out where I can
see them than have them hidden in some user's environment.
carl
--
carl lowenstein marine physical lab u.c. san diego
[EMAIL PROTECTED]
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg