Created
August 2, 2017 00:50
-
-
Save enriched/8f45e59cf5762add2eb49d316196a610 to your computer and use it in GitHub Desktop.
Run Bash command in another folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run-in-folder () | |
{ | |
CUR_PWD=$PWD; | |
cd $1; | |
eval "${@:2}"; | |
cd $CUR_PWD; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment