This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATH and SystemRoot oddity


On Fri, 26 Nov 2004, Jason Curl wrote:

> I have a similar question: I had to modify 'profile' to change
>   $PATH=xxxx:$PATH
> to
>   $PATH=xxxx
>
> How can I simply add $SYSTEMROOT:$SYSTEMROOT/system32 to this? It
> doesn't work as-is because $SYSTEMROOT = C:\Windows (and this is
> therefore not interpreted by the path). Rephrasing, what do I use to
> translate "C:\WINDOWS" to "/cygdrive/c/windows"?
>
> I had to do this because some nasty things in my path were causing
> problems (e.g. ClearQuest/ClearCase)

First off, you could have actually removed the offending entries from the
PATH using something like

OFFENDING_ENTRY="/cygdrive/c/ClearCase/bin"
PATH="`echo "$PATH" | sed "s#:$OFFENDING_ENTRY##"`"

Alternatively, if you want to translate any Win32 path to a Cygwin (POSIX)
path, use the "cygpath" utility, like this:

PATH=${PATH}:"`cygpath -u "$SYSTEMROOT/system32"`"

HTH,
	Igor
P.S. FWIW, the question is not that similar, and you should probably have
started a new thread with it.
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]