[svlug] Shell scripting is biting me! :)

hvrietsc@yahoo.com hvrietsc at yahoo.com
Wed Sep 19 16:37:01 PDT 2001


my point was not the {} stuff but the  "" stuff...
if your dirpath=/bla/bla bla (notice the space?)
then `dirname` will get you: bla bla
sosetting PROJ_ROOT=bla bla 
will give you an error message bla not found
however...
PROJ_ROOT="bla bla"
will work correctly

On Tue, Sep 18, 2001 at 08:52:07PM -0400, Felipe Leme wrote:
> 
> I don't think that matters. The {} is important to differentiate variables,
> like in the following code:
> 
> a=a
> ab=AB
> 
> echo $ab        # same as ${ab}, will print AB
> echo ${a}b      # will print ab
> 
> So, although you could have ${1} and ${10}, I don't think you could have any
> other variable that start with 0, besides $0...
> 
> 
> hvrietsc at yahoo.com writes:
> > but if you have a directory name with a space in it then you are still scr*wed so lets use:
> > PROJ_ROOT="`dirname ${0}`"
> > instead
> 
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug




More information about the svlug mailing list