Created
July 9, 2014 22:38
-
-
Save dblalock/5487534456ce1a35cf65 to your computer and use it in GitHub Desktop.
Bash include another file
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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
source "${DIR}/myFileToInclude.sh" | |
source "${DIR}/myOtherFileToInclude.sh" | |
# see http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment