Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Dave Korn" To: Subject: RE: can not find valid cygwin path Date: Tue, 1 Nov 2005 17:16:28 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: Message-ID: 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: ---------------------------------------------------------------- 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 ~> ---------------------------------------------------------------- What shell are you using? cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/