Sample Header Ad - 728x90

Difference between pushd/popd and sub-shell+cd

2 votes
2 answers
3676 views
I'm trying to understand if there are any benefits of using: pushd my_dir make all # ... or something else popd vs ( cd my_dir make all # ... or something else ) or is it merely a preference thing? I guess the latter notation can have issues like you may need to set -e (and other flags again), but it still carries out the exit code of its last command, and looks better in terms of syntax.
Asked by ahmet alp balkan (741 rep)
May 25, 2018, 05:14 PM
Last activity: Jan 4, 2019, 09:10 AM