Umm, actually, they should.  The default /etc/profile prepends
"/usr/local/bin:/usr/bin:/bin" to the PATH, and it's only executed when
bash gets a --login flag.
        Igor

On Tue, 29 Jul 2003, Lisbeth Kellogg wrote:

> Yes, that would fix it.  But I think we have a bug here.  In cygwin I
> get:
>
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:/cygdrive/c/Program
>  Files/Microsoft SQL 
> Server/80/Tools/BINN:/cygdrive/c/PROGRA~1/ULTRAE~1:/usr/bin:/cygdrive/c/blat184:/cygdrive/c/API360/Programs:/cygdrive/c/Program
>  Files/Adobe/Acrobat 4.0/Distillr:/cygdrive/c/xmlconvert:/cygdrive/c/Program 
> Files/msxsl:/cygdrive/c/Program Files/PKWARE:/cygdrive/c/Program 
> Files/PKWARE/PKZIPC:/cygdrive/c/jdk1.3.1_02/bin:/cygdrive/c/TIFFlIb
>
> In DOS I get:
>
> C:\WINNT>bash -c "echo $PATH"
> /cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:/cygdrive/c/Program
>  Files/Microsoft SQL 
> Server/80/Tools/BINN:/cygdrive/c/PROGRA~1/ULTRAE~1:/usr/bin:/cygdrive/c/blat184:/cygdrive/c/API360/Programs:/cygdrive/c/Program
>  Files/Adobe/Acrobat 4.0/Distillr:/cygdrive/c/xmlconvert:/cygdrive/c/Program 
> Files/msxsl:/cygdrive/c/Program Files/PKWARE:/cygdrive/c/Program 
> Files/PKWARE/PKZIPC:/cygdrive/c/jdk1.3.1_02/bin:/cygdrive/c/TIFFlib
>
> They shouldn't be different.
> ---
> Lisbeth Kellogg
>
> -----Original Message-----
> From: Elfyn McBratney [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 29, 2003 4:33 PM
> To: Lisbeth Kellogg
> Cc: [EMAIL PROTECTED]
> Subject: RE: Problem call a cygwin command from a dos batch file
>
>
> On Tue, 29 Jul 2003, Lisbeth Kellogg wrote:
>
> > I guess I found the answer to my own question.  Since some other
> > people have had this same problem, here is the solution.
> >
> > There is a problem with the PATH environment under Win 2000.  To
> > identify the problem I typed the following in DOS:
> >
> >      bash -c "which sort"
> >
> > I got a response of "/cygdrive/c/WINNT/system32/sort" instead of
> > "/usr/bin/sort".  This is the DOS sort command, not the cygwin sort
> > command.  I just had to change my command to:
> >
> >      bash -c "c:/cygwin/bin/sort -t \| -k 3 -k 11 -k 12 -o
> > sortedfile.txt unsortedfile.txt"
> >
> > This could be a problem any time the DOS and cygwin commands have the
> > same name.
>
> Like find, rexec, ... Having 'C:\Cygwin\bin' at the front of your PATH
> environment variable would have solved this.
>
> Elfyn

-- 
                                http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_                [EMAIL PROTECTED]
ZZZzz /,`.-'`'    -.  ;-;;,_            [EMAIL PROTECTED]
     |,4-  ) )-,_. ,\ (  `'-'           Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL     a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


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

Reply via email to