delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/01/12:43:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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: <BAY105-F1956DF14E964FE23F3D9EBE96F0@phx.gbl>
X-Sender: linq936 AT hotmail DOT com
In-Reply-To: <SERRANOOgl4rhYQYx3G0000007c@SERRANO.CAM.ARTIMI.COM>
From: "lin q" <linq936 AT hotmail DOT com>
To: dave DOT korn AT artimi DOT com, cygwin AT cygwin DOT com
Subject: RE: can not find valid cygwin path
Date: Tue, 01 Nov 2005 10:42:57 -0700
Mime-Version: 1.0
X-IsSubscribed: yes

>From: "Dave Korn" <dave DOT korn AT artimi DOT com>
>To: <cygwin AT cygwin DOT com>
>Subject: RE: can not find valid cygwin path
>Date: Tue, 1 Nov 2005 17:16:28 -0000
>
>lin q wrote:
> > Hi,
> >    I have the latest cygwin installed on WinXP SP1. It works fine in
> > general until I try to run some program today.
> >
> >   It is really weired, the program requiring setting up some environment
> > viriables, I guess iniside its code it tries to find some data based on
> > that variable setting. Anyway, I do it something like this in my script,
> >
> > export PROG_ENV=/cygdrive/c/prog
> > export PATH=$PROG_ENV/bin/nt:$PATH
> >
> > echo $PATH
> > $PROG_ENV/bin/nt/prog.exe
> >
>
>   Woops.  That's wrong already.  $PROG_ENV should have been expanded in
>"export PATH=" command, so "echo $PATH" should not show "$PROG_ENV/.." but
>"/cygdrive/c/prog/bin/nt....", as below:
>
>--------------------------------<snip!>--------------------------------
>dk AT espanola ~> echo $PATH
>/artimi/swtools/windows/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/win/c
>/W
>INDOWS/system32:/win/c/WINDOWS:/win/c/WINDOWS/System32/Wbem:/artimi/chips/ness
>/b
>in:/win/c/Modeltech_6.0d/win32:/win/c/Modeltech_6.0d/win32pe:/win/c/WINDOWS/sy
>st
>em32:/win/c/WINDOWS:/win/c/WINDOWS/System32/Wbem:/usr/bin
>dk AT espanola ~> cat foo.sh
>#!/bin/bash
>export PROG_ENV=/cygdrive/c/prog
>export PATH=$PROG_ENV/bin/nt:$PATH
>echo $PATH
>
>dk AT espanola ~> . foo.sh
>/cygdrive/c/prog/bin/nt:/artimi/swtools/windows/bin:/usr/local/bin:/usr/bin:/b
>in
>:/usr/X11R6/bin:/win/c/WINDOWS/system32:/win/c/WINDOWS:/win/c/WINDOWS/System32
>/W
>bem:/artimi/chips/ness/bin:/win/c/Modeltech_6.0d/win32:/win/c/Modeltech_6.0d/w
>in
>32pe:/win/c/WINDOWS/system32:/win/c/WINDOWS:/win/c/WINDOWS/System32/Wbem:/usr/
>bi
>n
>dk AT espanola ~>
>--------------------------------<snip!>--------------------------------
>
>   What shell are you using?
>
>     cheers,
>       DaveK
>--

I do not quite get what you are saying and your example, I am using BASH 
which the default cygwin shell.

In your example you can see that "/cygdrive/c/prog/bin/nt" is the first 
element in $PATH, that is what we want; "$PROG_ENV/bin/nt/prog.exe" is 
expanded to "/cygdrive/c/prog/bin/nt/prog.exe" correctly.

These are all as expected, the problem is why the correct path can not be 
taken.

Do I miss anything?

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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

- Raw text -


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