Re: bash 2.05a.0(1), pwd problem?
On Fri, Nov 16, 2001 at 11:41:39AM -0500, Terry Roe wrote: > [516]$ pwd > /cygdrive/c/Documents and Settings/../WINNT I've just uploaded a new bash. For some reason the bash-2.05a sources didn't contain the cygdrive patch I introduced for 2.05. Unfortunately I don't know anymore if I've ever sent it to the bash maintainer. However, I've just send that patch to him. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- 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/
bash 2.05a.0(1), pwd problem?
Is anyone else experiencing the following behavior? When navigating around /cygdrive/c, the present working directory is messed up. user@host ~ [510]$ bash --version GNU bash, version 2.05a.0(1)-release (i686-pc-cygwin) Copyright 2001 Free Software Foundation, Inc. user@host ~ [511]$ cd arch /home/user/arch user@host ~/arch [512]$ cd ../common user@host ~/common [513]$ pwd /home/user/common user@host ~/common [514]$ cd /cygdrive/c/Documents\ and\ Settings/ user@host /cygdrive/c/Documents and Settings/ [515]$ cd ../WINNT user@host /cygdrive/c/Documents and Settings/../WINNT [516]$ pwd /cygdrive/c/Documents and Settings/../WINNT -- 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/
Re: pwd-problem
On Wed, Aug 08, 2001 at 10:35:10AM -0400, Richard Ramos wrote: >Let me take this opportunity to describe some pwd-related behavior that >I thought was unexpected. Maybe we can hash out the whole "pwd" question. > >My not-so-informed opinion is that the behavior you see is what I would >have expected since the command would have executed in you current >directory. pwd prints the current working directory. If you cd to /, pwd will print /. I really don't understand how anyone could consider this to be a bug. >I put together a script to illustrate the unexpected behavior I see: > >$cat testscr >#! /bin/sh > >echo \$PWD=$PWD >echo cd .. >cd ..; echo pwd produces: `pwd` >echo \$PWD = $PWD > >The output of the script is as follows: > >$ tstscr >$PWD=/home/rramos >cd .. >pwd produces: /home >$PWD = /home/rramos > >The pwd command seems to produce the result I would have expected >(the directory changes according to the script) but the PWD variable stays >fixed at the directory where I ran the script from. I thought the PWD >variable should have followed along. The PWD variable is not used by ash. If you want PWD to change use bash. cgf -- 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/
Re: pwd-problem
Let me take this opportunity to describe some pwd-related behavior that I thought was unexpected. Maybe we can hash out the whole "pwd" question. My not-so-informed opinion is that the behavior you see is what I would have expected since the command would have executed in you current directory. I put together a script to illustrate the unexpected behavior I see: $cat testscr #! /bin/sh echo \$PWD=$PWD echo cd .. cd ..; echo pwd produces: `pwd` echo \$PWD = $PWD The output of the script is as follows: $ tstscr $PWD=/home/rramos cd .. pwd produces: /home $PWD = /home/rramos The pwd command seems to produce the result I would have expected (the directory changes according to the script) but the PWD variable stays fixed at the directory where I ran the script from. I thought the PWD variable should have followed along. Rich Peter Feldbaumer wrote: > Hi! > > I'm new to this mailing-list, so please excuse if I ask questions that > aren't that new to you. > I tried to search the archives concerning pwd-problems, and found that there > have already been some discussions concerning the paths pwd (or /bin/pwd) is > returning. > > I'm having the problem, that pwd always returns the path where you typed in > your last command. > This breaks a few makefiles if they are located in subdirectories, since > they use "$(shell pwd)" to get their "TOPDIR". > And since pwd doesn't return the path the makefile is in, but rather the > path you typed "make -C subdir" in, they don't get their "TOPDIR" right. > > First I thought that this was a problem only concerning "make", but some > tests prooved that this seems to be a general problem with "pwd". > > If you have a short shell-script > > #!/bin/sh > pwd > > saved as /tmp/print_pwd, and then go to your root dir and type > > tmp/print_pwd > > the output of print_pwd will be > > / > > and not > > /tmp > > as I would expect. > > Please correct me, but I don't think that this is the expected behaviour of > "pwd". > Right now I'm using the snaptshot of Aug.7th 2001 on Win98, but this "bug" > (feature?) was already present in the snapshots before. > > If I'm wrong about this, please could you point out ANY way that I can get > pwd to print the "current" directory, since I tried already numerous > versions (cd tmp && pwd ) and they all deliver the same result! > > Best regards, > Peter Feldbaumer > -- > FeldTech.com - Software Engineering & System Solutions > Goestingerstraße 72, 8051 Graz, Austria > Tel.: +43/316/584530 - Fax.: +43/316/584930 > http://www.feldtech.com - mailto:[EMAIL PROTECTED] > > -- > 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/ begin:vcard n:Ramos;Richard tel;work:732-380-2846 x-mozilla-html:FALSE org:Coree Networks adr:;;56 Park Road;Tinton Falls;NJ;07724; version:2.1 email;internet:[EMAIL PROTECTED] title:Software Engineer fn:Richard Ramos end:vcard -- 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/
RE: pwd-problem
> From: Peter Feldbaumer [mailto:[EMAIL PROTECTED]] > Subject: pwd-problem > I'm having the problem, that pwd always returns the path > where you typed in your last command. >... > If you have a short shell-script > > #!/bin/sh > pwd > > saved as /tmp/print_pwd, and then go to your root dir and type >tmp/print_pwd > the output of print_pwd will be > / > and not > /tmp > as I would expect. > > Please correct me, but I don't think that this is the > expected behaviour of "pwd". It is the expected behaviour. > Right now I'm using the snaptshot of Aug.7th 2001 on Win98, > but this "bug" > (feature?) was already present in the snapshots before. This is not a Cygwin issue. All unix-based systems behave this way. > > If I'm wrong about this, please could you point out ANY way > that I can get > pwd to print the "current" directory, since I tried already numerous > versions (cd tmp && pwd ) and they all deliver the same result! You seem to have a strange idea of "current" directory. Would "dirname" do what you want? -- 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/
pwd-problem
Hi! I'm new to this mailing-list, so please excuse if I ask questions that aren't that new to you. I tried to search the archives concerning pwd-problems, and found that there have already been some discussions concerning the paths pwd (or /bin/pwd) is returning. I'm having the problem, that pwd always returns the path where you typed in your last command. This breaks a few makefiles if they are located in subdirectories, since they use "$(shell pwd)" to get their "TOPDIR". And since pwd doesn't return the path the makefile is in, but rather the path you typed "make -C subdir" in, they don't get their "TOPDIR" right. First I thought that this was a problem only concerning "make", but some tests prooved that this seems to be a general problem with "pwd". If you have a short shell-script #!/bin/sh pwd saved as /tmp/print_pwd, and then go to your root dir and type tmp/print_pwd the output of print_pwd will be / and not /tmp as I would expect. Please correct me, but I don't think that this is the expected behaviour of "pwd". Right now I'm using the snaptshot of Aug.7th 2001 on Win98, but this "bug" (feature?) was already present in the snapshots before. If I'm wrong about this, please could you point out ANY way that I can get pwd to print the "current" directory, since I tried already numerous versions (cd tmp && pwd ) and they all deliver the same result! Best regards, Peter Feldbaumer -- FeldTech.com - Software Engineering & System Solutions Goestingerstraße 72, 8051 Graz, Austria Tel.: +43/316/584530 - Fax.: +43/316/584930 http://www.feldtech.com - mailto:[EMAIL PROTECTED] -- 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/
Re: Kludgy work-around for pwd problem
On Mon, May 14, 2001 at 11:02:16AM -0500, Molitor, Stephen wrote: > Is this the latest? > > bash --version > GNU bash, version 2.05.0(5)-release (i686-pc-cygwin) Nope. Use setup. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
RE: Kludgy work-around for pwd problem
Is this the latest? bash --version GNU bash, version 2.05.0(5)-release (i686-pc-cygwin) Copyright 2000 Free Software Foundation, Inc. That's the version I'm using. Steve Molitor [EMAIL PROTECTED] -Original Message- From: Corinna Vinschen [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 9:08 AM To: [EMAIL PROTECTED] Subject: Re: Kludgy work-around for pwd problem On Mon, May 14, 2001 at 08:54:20AM -0500, Molitor, Stephen wrote: > Hi, > > I have this weird problem with pwd in the latest Cygnus > installation. I mentioned it last week; here's a simple > shell session that demonstrates the problem: Did you update to the latest bash? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
Re: Kludgy work-around for pwd problem
On Mon, May 14, 2001 at 08:54:20AM -0500, Molitor, Stephen wrote: > Hi, > > I have this weird problem with pwd in the latest Cygnus > installation. I mentioned it last week; here's a simple > shell session that demonstrates the problem: Did you update to the latest bash? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developermailto:[EMAIL PROTECTED] Red Hat, Inc. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
Kludgy work-around for pwd problem
Hi, I have this weird problem with pwd in the latest Cygnus installation. I mentioned it last week; here's a simple shell session that demonstrates the problem: administrator@NDEV04C ~ $ pwd /cygdrive/d/home/steve administrator@NDEV04C ~ $ cd .. administrator@NDEV04C ~/.. $ pwd /cygdrive/d/home/steve/.. administrator@NDEV04C ~/.. $ cd steve administrator@NDEV04C ~/../steve $ pwd /cygdrive/d/home/steve/../steve administrator@NDEV04C ~/../steve $ cd ../steve administrator@NDEV04C ~/../steve/../steve $ pwd /cygdrive/d/home/steve/../steve/../steve administrator@NDEV04C ~/../steve/../steve $ Notice that the problem is not just with the prompt string; that's just a symptom. The real problem is with pwd. (Actually, I think it might be with the way cd sets the $PWD var.) Anyway, if anyone else is having this problem, I came up with a really kludgy work-around, which I put in my .bashrc: alias pwd="perl -e 'use Cwd; print cwd() . \"\n\"'" export PS1='`pwd`$ ' Obviously you must have Perl installed for this to work. Any insight into this problem would be greatly appreciated. Steve Molitor [EMAIL PROTECTED] -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
Re: pwd problem with GNU make
On Sun, Dec 24, 2000 at 02:31:16PM -0500, Christopher Faylor wrote: >On Thu, Dec 21, 2000 at 01:31:55PM -0800, Richard Y. Kim wrote: >> >>I have updated all my cygwin packages as of >>13:00 PST on December 21, 2000 from freesoftware.com. >> >>It seems like GNU make gets confused about the current working >>directory (indicated by the fact that included files are not found) >>when I cd into a directory using a drive letter and a trailing /. For >>example running "make" works fine after cd'ing using "/tmp", "/tmp/", >>or "c:/p/cygwin/tmp". However GNU make gets confused when >>"c:/p/cygwin/tmp/" is used with a trailing slash. >> >>I reported a similar problem with pwd in cygwin a few weeks ago >>which was followed by a flurry of discussion on getcwd() function. >> >>http://sources.redhat.com/ml/cygwin/2000-11/msg00590.html > >Sorry. This discussion has nothing to do with getcwd that I can see. Just to clarify, by "this discussion" I meant the URL that you are referring to. cgf -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
Re: pwd problem with GNU make
On Thu, Dec 21, 2000 at 01:31:55PM -0800, Richard Y. Kim wrote: > >I have updated all my cygwin packages as of >13:00 PST on December 21, 2000 from freesoftware.com. > >It seems like GNU make gets confused about the current working >directory (indicated by the fact that included files are not found) >when I cd into a directory using a drive letter and a trailing /. For >example running "make" works fine after cd'ing using "/tmp", "/tmp/", >or "c:/p/cygwin/tmp". However GNU make gets confused when >"c:/p/cygwin/tmp/" is used with a trailing slash. > >I reported a similar problem with pwd in cygwin a few weeks ago >which was followed by a flurry of discussion on getcwd() function. > >http://sources.redhat.com/ml/cygwin/2000-11/msg00590.html Sorry. This discussion has nothing to do with getcwd that I can see. cgf -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
pwd problem with GNU make
I have updated all my cygwin packages as of 13:00 PST on December 21, 2000 from freesoftware.com. It seems like GNU make gets confused about the current working directory (indicated by the fact that included files are not found) when I cd into a directory using a drive letter and a trailing /. For example running "make" works fine after cd'ing using "/tmp", "/tmp/", or "c:/p/cygwin/tmp". However GNU make gets confused when "c:/p/cygwin/tmp/" is used with a trailing slash. I reported a similar problem with pwd in cygwin a few weeks ago which was followed by a flurry of discussion on getcwd() function. http://sources.redhat.com/ml/cygwin/2000-11/msg00590.html The problem is demonstrate by the following. Note that /tmp/Makefile includes "../Maketarg" file which is a blank file. bash-2.04$ cygpath -w / C:\p\cygwin bash-2.04$ cat c:/p/cygwin/tmp/Makefile include ../Maketarg all : @echo hello bash-2.04$ cat c:/p/cygwin/Maketarg bash-2.04$ cd /tmp; make hello bash-2.04$ cd /tmp/; make hello bash-2.04$ cd c:/p/cygwin/tmp; make hello bash-2.04$ cd c:/p/cygwin/tmp/; make Makefile:1: ../Maketarg: No such file or directory make: *** No rule to make target `../Maketarg'. Stop. bash-2.04$ cygcheck.exe -v -s Cygnus Win95/NT Configuration Diagnostics Current System Time: Thu Dec 21 13:16:42 2000 WinNT Ver 5.0 build 2195 Service Pack 1 Path: /cygdrive/c/WINNT/system32 /cygdrive/c/WINNT /cygdrive/c/WINNT/system32/WBEM /usr/bin /usr/local/bin /cygdrive/c/Program Files/Resource Pro Kit/ /cygdrive/c/p/Adabas/bin /cygdrive/c/p/Adabas/pgm SysDir: C:\WINNT\System32 WinDir: C:\WINNT PWD = `/tmp/' CYGWIN = `binmode' USER = `ryk' MAKE_MODE = `unix' HOME = `/cygdrive/c/ryk' NUMBER_OF_PROCESSORS = `1' DBROOT = `C:\p\Adabas' LOGONSERVER = `\\RYKLAPTOP' OS2LIBPATH = `C:\WINNT\system32\os2\dll;' TZ = `PST8PDT' TMPDIR = `/cygdrive/c/Temp' COMSPEC = `C:\WINNT\system32\cmd.exe' DOMAINNAME = `dspwiz.com' DBWORK = `C:\p\Adabas\sql' SYSTEMDRIVE = `C:' HOSTNAME = `RYKLAPTOP' PROCESSOR_REVISION = `0803' EMACSLOCKDIR = `C:/p/emacs-20.7/lock' PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH' COMPUTERNAME = `RYKLAPTOP' CLASSPATH = `C:\Program Files\PhotoDeluxe 2.0\AdobeConnectables' WINDIR = `C:\WINNT' USERPROFILE = `C:\Documents and Settings\ryk' EMACSPATH = `C:/p/emacs-20.7/bin' EMACSDOC = `C:/p/emacs-20.7/etc' PROGRAMFILES = `C:\Program Files' SMTPSERVER = `dspwiz.com' MACHTYPE = `i686-pc-cygwin' PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 3, GenuineIntel' EMACS = `t' OS = `Windows_NT' CVS_RSH = `ssh' OLDPWD = `/tmp' NNTP = `news.coho.net' PROCESSOR_ARCHITECTURE = `x86' TEMP = `/cygdrive/c/Temp' TERMCAP = `emacs:co#85:tc=unknown:' PROCESSOR_LEVEL = `6' SYSTEMROOT = `C:\WINNT' TMP = `/cygdrive/c/tmp' HOMEDRIVE = `c:' ALLUSERSPROFILE = `C:\Documents and Settings\All Users' EMACS_DIR = `C:/p/emacs-20.7' EMACSDATA = `C:/p/emacs-20.7/etc' SSH_AGENT_PID = `464' SHLVL = `1' APPDATA = `C:\Documents and Settings\ryk\Application Data' COMMONPROGRAMFILES = `C:\Program Files\Common Files' HOMEPATH = `\ryk' USERDOMAIN = `RYKLAPTOP' SHELL = `c:/p/cygwin/bin/bash.exe' USERNAME = `ryk' CVSROOT = `:ext:ryk@rykserver2:/var/cvs/ryk' EM_PARENT_PROCESS_ID = `784' HOSTTYPE = `i686' EMACSLOADPATH = `C:/p/emacs-20.7/site-lisp;C:/p/emacs-20.7/lisp;C:/p/emacs-20.7/leim' OSTYPE = `cygwin' DBCONFIG = `C:\p\Adabas\sql' SSH_AUTH_SOCK = `/tmp/ssh-Hxem1000/agent.1000' TERM = `emacs' _ = `/usr/bin/cygcheck.exe' Use `-r' to scan registry a: fd N/AN/A c: hd NTFS9007Mb 61% CP CS UN PA FC y: cd N/AN/A C:\p\cygwin\bin /usr/bin system textmode C:\p\cygwin\lib /usr/lib system textmode C:\p\cygwin /system textmode Found: C:\p\cygwin\bin\bash.exe Found: C:\p\cygwin\bin\cat.exe Found: C:\p\cygwin\bin\cpp.exe Found: C:\p\cygwin\bin\find.exe Found: C:\p\cygwin\bin\gcc.exe Found: C:\p\cygwin\bin\gdb.exe Found: C:\p\cygwin\bin\ld.exe Found: C:\p\cygwin\bin\ls.exe Found: C:\p\cygwin\bin\make.exe Found: C:\p\cygwin\bin\sh.exe 56k 2000/12/03 C:\p\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0 "cygbz21.0.dll" v0.0 ts=2000/11/20 15:53 45k 2000/12/07 C:\p\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0 "cygform5.dll" v0.0 ts=2000/12/6 22:41 18k 2000/10/23 C:\p\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm.dll" v0.0 ts=2000/10/22 19:26 17k 2000/11/30 C:\p\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0 "cyghistory4.dll" v0.0 ts=2000/11/29 18:28 14k 2000/10/23 C:\p\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0 "cygintl.dll" v0.0 ts=2000/10/23 12:02 81k 2000/12/05 C:\p\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0 "cygitcl30.dll" v0.0 ts=2000/11/25 17:43 35k 2000/12/05 C:\p\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
Patch for inetutils' pwd problem (Re: latest cygwin does not track pwd?)
The enclosed patch will fix the problem of getcwd bug in ftpd. This will work both for inetutils-1.3.2-7 and inetutils-1.3.2-8. I hope this help. Regards, Takashi Nishigaya At Wed, 01 Nov 2000 09:47:45 -0600, Chris Abbey <[EMAIL PROTECTED]> wrote: > > At 23:58 11/1/00 +0900, [EMAIL PROTECTED] wrote: > >$ grep getpwd ftpd.c > > path = getcwd (0, 0); > > char *cwd = getcwd (0, 0); > > char *path = getcwd (0, 0); > > > >The ftpd should be fixed, I think. > > I am sure that patches will be happily accepted by the list. ;) > > now the forces of openness > have a powerful and > unexpected new ally > http://ibm.com/linux/ inetutils-1.3.2.diff -- Want to unsubscribe from this list? Send a message to [EMAIL PROTECTED]
