Last active
December 25, 2015 11:44
-
-
Save lsongdev/af1c300890ca1024fa60 to your computer and use it in GitHub Desktop.
auto load PATH config from /etc/path.d/*
This file contains hidden or 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
| #!/usr/bin/env bash | |
| PATH_DIR=/etc/path.d | |
| for file in $(ls $PATH_DIR); do | |
| for line in $(cat "$PATH_DIR/$file"); do | |
| PATH=$PATH:$line | |
| done | |
| done | |
| export PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment