Skip to content

Instantly share code, notes, and snippets.

@lsongdev
Last active December 25, 2015 11:44
Show Gist options
  • Select an option

  • Save lsongdev/af1c300890ca1024fa60 to your computer and use it in GitHub Desktop.

Select an option

Save lsongdev/af1c300890ca1024fa60 to your computer and use it in GitHub Desktop.
auto load PATH config from /etc/path.d/*
#!/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