home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aux
- Path: sparky!uunet!sun-barr!ames!nsisrv!jagubox!jim
- From: jim@jagubox.gsfc.nasa.gov (Jim Jagielski)
- Subject: Re: ksh weirdness
- Message-ID: <924@jagubox.gsfc.nasa.gov>
- Sender: usenet@nsisrv.gsfc.nasa.gov (Usenet)
- Nntp-Posting-Host: jagubox.gsfc.nasa.gov
- Reply-To: jim@jagubox.gsfc.nasa.gov (Jim Jagielski)
- Organization: NASA/Goddard Space Flight Center
- References: <5285@transfer.stratus.com>
- Date: Fri, 31 Jul 1992 10:18:35 GMT
- Lines: 35
-
- dswartz@redondo.sw.stratus.com (Dan Swartzendruber) writes:
-
-
- >I just finished tracking down a weird "feature" in ksh. Basically, if
- >you cd to a directory with one or more symlinks as components, the pwd
- >command in ksh reports the current directory based on what you typed,
- >not where you actually are. Example:
-
- >in /usr, local is a symlink to /users/local
-
- >so when I type "cd /usr/local/src", followed by "pwd", I get told
- >/usr/local/src, not /users/local/src. Note that csh and sh do the
- >expected thing (well, expected by me anyway.)
-
- This is due to the way 'pwd' is implemented... it's actually "print -r - $PWD"
-
- For fun try:
-
- $ cd /usr/local/src
- $ cd ..
- $ cd ..
-
- You get /usr not /users.
-
- Some people, myself included, would suggest that "ksh" is the more correct
- of "sh" and "csh" ;)
- --
- ==============================================================================
- #include <std/disclaimer.h>
-
- Jim Jagielski NASA/GSFC, Code 734.4
- jim@jagubox.gsfc.nasa.gov Greenbelt, MD 20771
-
- "The great scallop... this tatty, scrofulous old rapist,
- is second in depravity only to the common clam."
-