This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: pwd-problem
- To: 'Peter Feldbaumer' <feldbaumer at feldtech dot com>, cygwin at cygwin dot com
- Subject: RE: pwd-problem
- From: "Robinow, David" <drobinow at dayton dot adroit dot com>
- Date: Wed, 8 Aug 2001 09:57:27 -0400
> From: Peter Feldbaumer [mailto:feldbaumer@feldtech.com]
> 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/