[EMAIL PROTECTED] wrote:
> >On 6/6/07, Michael Shapiro <[EMAIL PROTECTED]> wrote:
> >> I'm more than happy for it to be published, just ask that you keep
> >> the attribution on it so people who have questions and complaints
> >> can whine at me directly.  Maybe when we're done with ksh93 we
> >> can have a mode which enforces it automatically built-in :)
> >
> >A very good document, especially since it looks almost exactly like
> >how I write scripts.  Especially the csh guidance.  :)
> >
> >One nit.  In the Quoting section it says:
> >
> >    Use whatever quotes are appropriate for your situation, but please
> >    do not unnecessarily quote everything (also see 7 above).
> >
> >The numbers for the sections are missing but I think it refers to the
> >reference to ${bar} vs. ${bar}.  Rather unfortunately, in that section
> >there is gratuitous quoting.
> >
> >    [ $install = yes ] && root="/a/" || root="/"
> >
> >The stuff to the right of each root= doesn't need quotes.
> 
> And I'm not sure about the context, but the $install would appear to need
> some quotes.

AFAIK it depends on the content of ${install}. IMO quotes are only
needed if the value may contain a space or any other character from
${IFS}, user input or a filename. If the values are guranteed to be only
"yes" or "no" no quotes are needed (but in that case you could switch
the values to { "true", "false" } or { 0, 1 } and follow the advice for
"boolean" values described in
http://mail.opensolaris.org/pipermail/shell-discuss/2007-June/000465.html).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to