Last active
January 11, 2017 18:42
-
-
Save modle/4096728b728baf35c0573c2d124c4fd4 to your computer and use it in GitHub Desktop.
.bashrc which loads a list of files
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
files=(somefile1 somefile2) | |
path="$HOME/path/to/dir/containing/files/" | |
for file in ${files[@]} | |
do | |
file_to_load=$path$file | |
if [ -f "$file_to_load" ]; | |
then | |
. $file_to_load | |
echo "loaded $file_to_load" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment