[GRASSLIST:2488] Re: Trouble with handling of my path by grass

ted byers ted.byers at sympatico.ca
Wed Sep 26 08:56:44 EDT 2001


Thanks Eric,

That did the trick.

>
> This is the problem.  Try editing Init.sh down where there a line that
> looks like:
>
>   echo "export PATH=$PATH" >> $bashrc
>
> to
>
>   echo "export PATH=\"$PATH\"" >> $bashrc
>
> There may be a few other places where some quoting needs to be done
> so spaces are handled.  Maybe some other CygWin users want to look
> at this -- Note underscores or hyphens make good separators for file
> and directory names!
>
There is one of these for bash and one for cygwin, so I changed them both,
and now I get no more errors.

I do not disagree about the utility of hyphens and underscores as
separators, but on NT we can't get rid of spaces in the path entirely, since
NT itself creates the "Program Files" directory on each drive.  It must have
because I didn't.  And it seems a lot of MS software (I have lots of that
too) seems to depend on these directories.

> > If I open a window in which bash is running, and call "echo
> $PATH", I
> > get
> > exactly the right output.  If I then call "export PATH", it seems to
> > behave
> > properly as I get no output, but if I call "export $PATH", I get the
> > same
> > errors that I see when I srtart grass.
>
> There is no "export $PATH" that I can see...
>
Now that is what confused me.  The behaviour I saw was that which I could
reproduce at the command line using export $PATH, but I couldn't find such a
statement in Init.sh.

> > Also, is it my imagination, or does Init.sh rewrite .bashrc
> toward the
> > end
> > of the script?  If it is rewriting .bashrc, my question is why, and
> > might
> > the errors I am seeing be caused here?
>
> GRASS is fooling with the shell it's invoking, but it is not
> modifying your
> ~/.bashrc.  Do a "ls -a" in one of your mapsets, and you'll
> see the file
> it has written.  You can add some niceties by putting things in
> ~/.grass.bashrc.  I like color listings for instance...
>
>
Now the question is why does it need to fool with the shell it is invoking?

But I'll worry about adding some niceties when I get more comfortable with
the bash shell.

Thanks again,

Ted



More information about the grass-user mailing list