Subject: Re: Qs re pkgsrc/mk/install/usergroup
To: Johnny Lam <jlam@NetBSD.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 03/28/2005 21:37:53
> > - would it be a good idea to enclose variables in case expressions by
> > double quotes? 
> 
> I haven't seen any guidelines on this, and I don't have any experience 
> with shell scripting on non-NetBSD systems, so I just went with what 
> worked on NetBSD.  If there are style guides that recommend this, please 
> feel free to add the appropriate quotes to the scripts.

Things like

[ -r $a ]
or
case $a

fail with some systems' shells if $a is empty. In any case I have been told
the result is undefined. Therefore it is saver to enclose such variables in
quotes.


-- 
Georg Schwarz    http://home.pages.de/~schwarz/
 georg.schwarz@freenet.de  +49 178 8545053