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, 28-May-2019 15:30:38 EDT Yes, I Know IT ! 🎓