On Sunday 21 November 2004 10:34 am, K-sPecial wrote:
> David Baron wrote:
> > Quick answer: How might one retrieve the path to the most recent entry in
> > a directory to pass to something else in a bash script?
>
> [EMAIL PROTECTED]:/tmp$ echo $OLDPWD
> /home/kspecial
> [EMAIL PROTECTED]:/tmp$ echo $PWD
> /tmp
> [EMAIL PROTECTED]:/tmp$
>
> PWD contains the current directory while OLDPWD contains the last
> accessed directory.
>
> --K-sPecial

Just maybe you could use
$ cd -

It worked for me.  daveA


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to