Mike Gerdts wrote:
> On 6/6/07, Michael Shapiro <[EMAIL PROTECTED]> wrote:
[snip]
> 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.

If the variable "root" contains a filename as value then quotes should
be used.
IMHO _ALWAYS_ with _ZERO_ exceptions.
Otherwise you'll run into "funny" problems with things like $ rm -rf
$root/foo/bar/$snap # when either "snap" or "root" are not set. IMO the
correct way would be $ rm -rf "${root}/foo/bar/${snap}" # (and scripts
like "bfu" are full of this stuff which only waits to blow-up badly
sooner or later... ;-( )

----

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