Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2010 22:07:50 -0800
From:      Nerius Landys <nlandys@gmail.com>
To:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   simple (and stupid) shell scripting question
Message-ID:  <560f92641002142207w7eade79fr6a4f40ae5b92f4b9@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
#!/bin/sh

I have these lines in my script:

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`

Does this behave any differently in any kind of case?  Are thes double
quotes just superfluous?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?560f92641002142207w7eade79fr6a4f40ae5b92f4b9>