SyntaxFix
Write A Post
Hire A Developer
Questions
Similar to @ernest-a's answer but without affecting $OLDPWD or define a new function you could fire a subshell (cd <path>; pwd)
$OLDPWD
(cd <path>; pwd)
$ pwd /etc/apache2 $ cd ../cups $ cd - /etc/apache2 $ (cd ~/..; pwd) /Users $ cd - /etc/cups