This is the mail archive of the cygwin@cygwin.com 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]

Re: PATH troubles


On Tue, Jul 17, 2001 at 02:29:24PM +0200, Francis Meyvis wrote:
> Hoi,
> 
> I've a strange problem with PATH variable on w2k and nt4.
> I installed cygwin in c:\cygwin.
> 
> I've the following shell script tst.sh (it calls a dos bat shell script from
> within bash):
> c:\temp\tst.bat
> 
> The dos batch script just contains:
> @echo %PATH%
> 
> When I invoke the following from within bash shell
> export PATH=$PATH:c:/temp
> echo $PATH
> ./tst.sh
> 
> I get as a result
> /usr/local/bin:/usr/bin:/cygdrive/c/Python21/:/usr/bin  ... :c:/temp
                                                               ^^^^^^^
Don't do this. $PATH inside of Cygwin is POSIX compatible and uses colon
as separator character. So `c:' is treated as a relative path `c' plus
a separator. The next `/temp' is then relative to the Cygwin root dir
obviously.

Don't mix DOS and UNIX paths.

Don't do it.

Don't.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]