Nerius Landys <nlan...@gmail.com> wrote:

> #!/bin/sh
> 
> DIRNAME="`dirname \"$0\"`"
> cd "$DIRNAME"
> SCRIPTDIR="`pwd`"
> 
> What if I got rid of extra double quotes?  Like this:
> 
> DIRNAME=`dirname \"$0\"`
> cd "$DIRNAME"
> SCRIPTDIR=`pwd`

That is perfectly fine.  Word-splitting and filename expansion are
not performed for variable assignments.  Also immune is the expression
after "case", so this is always fine:
 
  case $FOO in ...
 
-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to