🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Mitchell N. Perilstein Mon, 10 Aug 1992 18:16
.. in $PWD: bug or feature?
#272
Author: Mitchell N. Perilstein
Date: Mon, 10 Aug 1992 18:16
30 lines
1032 bytes
Forgive me if this is part of the old getwd() problem but,

  bash$ cd /usr/local/..
  bash$ builtin pwd
  /usr
  bash$ /bin/pwd
  /usr
  bash$ echo $PWD
  /usr/local/..

When should `pwd` differ from $PWD? Users who have \W in their PS1 might
find this annoying. 


bash$ echo $BASH_VERSION
1.12.1

# Also seen on Sun3,
SunOS unuk 4.0  sun

# Sun4,
SunOS mira 4.1 2 

# and rs6000
AIX maya 1 3 000001601000

---
 Mitchell N. Perilstein                          5457 Twin Knolls Rd
 CAD Language Systems, Inc.                      Suite 101
 410-992-5700                                    Columbia, MD 21045-3259
Re: .. in $PWD: bug or feature?
#872
Author: Chet Ramey
Date: Tue, 11 Aug 1992 17:22
30 lines
1225 bytes
In article <MITCH.92Aug10141637@mira.clsi> mitch@clsi.UUCP (Mitchell N. Perilstein) writes:
>Forgive me if this is part of the old getwd() problem but,
>
>  bash$ cd /usr/local/..
>  bash$ builtin pwd
>  /usr
>  bash$ /bin/pwd
>  /usr
>  bash$ echo $PWD
>  /usr/local/..
>
>When should `pwd` differ from $PWD? Users who have \W in their PS1 might
>find this annoying. 

This is fixed in 1.13, which performs canonicalization on $PWD.

odin(3)$ cd /usr/local/..
odin(3)$ builtin pwd
/usr
odin(3)$ /bin/pwd
/usr
odin(3)$ echo $PWD
/usr

Chet
-- 
``The use of history as therapy means the corruption of history as history.''
	-- Arthur Schlesinger

Chet Ramey, Case Western Reserve University	Internet: chet@po.CWRU.Edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads