From a POSIX shell `$OLDPWD` holds the name of the previous working directory:
cd /tmp
echo You are here: $PWD
echo You were here: $OLDPWD
cd $OLDPWD
Conversation
Notices
-
Yes, I Know IT ! 🎓 (yesiknowit@mastodon.social)'s status on Tuesday, 26-Feb-2019 12:00:37 EST Yes, I Know IT ! 🎓