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 Wednesday, 28-Nov-2018 05:26:10 EST
Yes, I Know IT ! 🎓