Last active
June 8, 2023 16:55
-
-
Save D1360-64RC14/abab9bd8a036f499e0f956e0d6196153 to your computer and use it in GitHub Desktop.
Put every /opt/*/bin into PATH. The bash code should be placed at the end of your ~/.bashrc file (or similar). Supports also symbolic links to bin or complete folders.
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
# Put every /opt/*/bin into PATH | |
OPT_BINS=$(find /opt/*/bin -maxdepth 0 -type d,l 2> /dev/null) | |
PATH_OPT_BINS=$(echo $OPT_BINS | sed 's/ \//:\//g') | |
export PATH=$PATH:$PATH_OPT_BINS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment