delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/28/13:00:43

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <232810-22003122818028299@M2W095.mail2web.com>
X-Priority: 3
Reply-To: lhall AT rfk DOT com
X-Originating-IP: 209.113.174.244
From: "lhall AT pop DOT ma DOT ultranet DOT com" <lhall AT pop DOT ma DOT ultranet DOT com>
To: cygwin AT cygwin DOT com, cygwin AT cygwin DOT com
Subject: Re: DOS <-> Bash interaction...
Date: Tue, 28 Jan 2003 13:00:28 -0500
MIME-Version: 1.0
X-OriginalArrivalTime: 28 Jan 2003 18:00:28.0545 (UTC) FILETIME=[24256F10:01C2C6F7]
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h0SI0hl03606

Looks like no one read Hannu's email, including Hannu! ;-)

The output included clearly shows that his Cygwin installation
contains the default path setting from /etc/profile.  Cygwin paths
are first.  There override the Windows path.  The Windows 'find' 
*is* hidden by the Cygwin version (see below).  So are other like 
named facilities.  That's why the Cygwin installation constructs 
the path this way.  While Hannu prescribes this as a viable option, 
it would appear that he didn't recognize that this was the option 
being used before posting, since his email states that Cygwin does
exactly the oppposite with the path.  It does not.

Larry

Original Message:
-----------------
From: Igor Pechtchanski pechtcha AT cs DOT nyu DOT edu
Date: Tue, 28 Jan 2003 11:50:55 -0500 (EST)
To: cygwin AT cygwin DOT com
Subject: Re: DOS <-> Bash interaction...


Umm, I don't think this is dependent on the Windows version...  My
(mostly standard, slightly edited) /etc/profile *prepends*
"/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/X11R6/bin" to the
PATH...  Yours probably does too.  Thus, /bin/find.exe should hide
/cygdrive/c/WINDOWS/COMMAND/find.exe (which your cygcheck output snippet
confirms).

You can always check which program will be invoked by typing "type -a
programname" in bash.  For "find.exe" you should get something like:

	$ type -a find.exe
	find.exe is /usr/bin/find.exe
	find.exe is /bin/find.exe
	find.exe is /cygdrive/c/WINDOWS/COMMAND/find.exe

If you get something different as the first entry, your /etc/profile does
*append* the standard paths to the contents of $PATH.  This means you've
probably changed it at some point in the past.  Change it back.
	Igor

On Tue, 28 Jan 2003, Hannu E K Nevalainen (garbage mail) wrote:

> NOTE: Running Win98SE
> Don't know how this affects Win<Other>
>
> on 2002-12-25 at 13:37 i wrote about a problem with $SHELL versus 'startx'
> i.e: startx won't work if $SHELL contains 'command.com' (or any DOS-stuff
> maybe?). The contents of DOS-$SHELL gets copied into bash-$SHELL -> not
> good.
>
> There is another similar problem that might be hard to cope with too:
>
>  As one starts bash it apparently:
>         - copies the DOS/WIN - "$PATH" contents,
>         - puts them in bash-$PATH and then
>         - appends any new stuff
>
>  I'm not sure this behaviour is 'good'. Cause:
>         1. there is a 'find.exe' in C:\windows\command\
>            bash should have problems locating '/usr/bin/find'
>         2. If you have almost any compiler installed there
>            will be a 'cpp' and 'make' in one of them' paths.
>
> This is reflected by, e.g: $ cygcheck -s -v -r
> ...
> Found: c:\PROGRAM\BC31_DOS\BIN\cpp.exe
> Warning: C:\Program\cygwin\bin\cpp.exe hides
c:\PROGRAM\BC31_DOS\BIN\cpp.exe
> Found: c:\PROGRAM\BC5\BIN\cpp.exe
> Warning: C:\Program\cygwin\bin\cpp.exe hides c:\PROGRAM\BC5\BIN\cpp.exe
> Found: C:\Program\cygwin\bin\find.exe
> Found: c:\WINDOWS\COMMAND\find.exe
> Warning: C:\Program\cygwin\bin\find.exe hides c:\WINDOWS\COMMAND\find.exe
> ...
> Found: C:\Program\cygwin\bin\make.exe
> Found: c:\PROGRAM\BC31_DOS\BIN\make.exe
> Warning: C:\Program\cygwin\bin\make.exe hides
> c:\PROGRAM\BC31_DOS\BIN\make.exe
> Found: c:\PROGRAM\BC5\BIN\make.exe
> Warning: C:\Program\cygwin\bin\make.exe hides c:\PROGRAM\BC5\BIN\make.exe
> ...
>
> Suggested remedy:
>  a) make the DOS-PATH contents appear (or be searched) LAST in bash-PATH
>  b) DON'T copy DOS-PATH contents at all
>  c) Have DOS-PATH appear as MSDOSPATH in bash, have bash use it.
>
>  d) temporary solution below (add "source ~/.rm_bc_paths" to ~/.profile)
>     NOTE1: simple commented script to make the *problem* clear.
>     NOTE2: The script contains MY PERSONAL installation paths (not the
> defaults)
>
> /Hannu E K Nevalainen, Mariefred, Sweden
>
> [~/.rm_bc_paths snipped]

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
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/


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019