Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: From: "Schaible, Joerg" To: cygwin AT sourceware DOT cygnus DOT com Subject: RE: Cygwin compatibility Questions Date: Wed, 5 May 1999 20:28:09 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id OAA02018 >> This seems inconsistent that pwd doesn't always return a path with >> the drive letter. Any pwd command my scripts issue might or might >> not return a drive letter. >Suggestion: create your own pwd so that it always returns the the full win32 >path. See the cygwin api docmentation. You may use the following function (I've added it to my .bashrc): function dirpath { pushd $1 > /dev/null 2>&1 echo $(cmd /c cd) popd > /dev/null 2>&1 } Jörg > -----Original Message----- > From: Earnie Boyd [SMTP:earnie_boyd AT yahoo DOT com] > Sent: Wednesday, May 05, 1999 8:23 PM > To: flawlor AT us DOT ibm DOT com > Cc: cygwin users > Subject: Re: Cygwin compatibility Questions > > --- flawlor AT us DOT ibm DOT com wrote: > > > > > > Thanks a lot for the quick response. > > > > I did a little more testing and the problem wasn't exactly what I first > > thought, > > but let me give you a couple commands that illustrate it a little more > > clearly. > > I checked that I was correctly invoking the cygwin pwd command. > > > > set -x > > oldpath=`pwd` > > cd E:/temp > > epath=`pwd` > > > > Cygwin is installed on my C: drive and the bash shell starts off in > > C:/WINNT/Profiles/flawlor/Desktop. > > > > The result of the above script yields: > > > > oldpath=/WINNT/Profiles/flawlor/Desktop > > epath=//E/temp > > > > Well, that is the way it works now. In the snapshots and the next release > B21 > epath will map to /cygpath/e/temp just to give you a heads up. > > This has to do with the mapping and remapping of the filesystem paths. > > > > It seems that whenever I am on my 'home' disk, there is no drive letter > > returned by pwd. > > This seems fine within the script as a cd to a path without a drive > letter > > assumes the 'home' drive. > > > > The problem comes, for example, when I try to pass these paths to > executables > > which are running on a different drive. They make the assumption > > that it is a path on their current drive and cannot find it if they are > not > > running from the 'home' drive, e.g., > > > > E:/temp/somefunc.exe -f ${oldpath}/thedata > > > > fails because $oldpath doesn't have any drive letter and 'somefunc' > > is trying to find it on the E: drive. > > > > Only if somefunc.exe is a non-cygwin program. cygwin built program a > cygwin > path aware and would work as you would like them too. > > > This seems inconsistent that pwd doesn't always return a path with > > the drive letter. Any pwd command my scripts issue might or might > > not return a drive letter. > > Suggestion: create your own pwd so that it always returns the the full > win32 > path. See the cygwin api docmentation. > === > "Earnie Boyd" > CYGWIN RELATED HELP: > DOCUMENTATION: > DLLHELP: > ARCHIVE SEARCH: OR > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com