determining the real directory when using automounts
Larry Blair
lmb at vicom.com
Thu Feb 23 20:22:32 AEST 1989
ekrell at ulysses.att.com writes:
>In ksh, pwd is a builtin which returns the "logical" name of the current
>working directory, so if you "cd /foo/bar", pwd always returns "/foo/bar",
>even if you're in a different place as a consequence of following symbolic
>links or other such wierdness.
when I used csh, I used to have a "cwd", which just did a "echo $cwd".
That way I could get both the logical and physical current directory.
When I changed to ksh, I wanted to retain this functionality, so I put the
following in the .kshrc:
alias cwd='print - ~+'
unalias pwd
Now "pwd" and "cwd" work like they did for csh.
--
Larry Blair ames!vsi1!lmb lmb at vicom.com
More information about the Comp.sys.sun
mailing list