[shell-discuss] Re: [osol-code] Coding (style) guidelines for shell scripts ?
Peter Memishian
peter.memishian at Sun.COM
Wed Jun 6 19:49:20 PDT 2007
>
> > * Using -p" for starting non-interactive shell scipts is AFAIK a NO-OP,
> > e.g.
> > -- snip --
> > #!/bin/ksh -p
> > -- snip --
> > should be replaced with
> > -- snip --
> > #!/bin/ksh
> > -- snip --
>
> I've recently been burned by this one. lucreate or luupgrade (I
> forget which) blew up due to missing -p and having some questionable
> stuff in the file pointed to by $ENV.
Indeed. I think the rule should be exactly the opposite of Roland's
advice: "-p" should be mandatory in all shell scripts. (We've been burned
by this internally many, many times.)
--
meem
More information about the shell-discuss
mailing list