Skip to content

Instantly share code, notes, and snippets.

@kevinnls
Created May 1, 2022 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinnls/0d921195c70d6f1787cb1df86c1db624 to your computer and use it in GitHub Desktop.
Save kevinnls/0d921195c70d6f1787cb1df86c1db624 to your computer and use it in GitHub Desktop.
prepend_to_path(){
for dir in "${@}"; do
if [ -d "${dir}" ]; then
PATH="${dir}:${PATH}"
fi
done
}
append_to_path(){
for dir in "${@}"; do
if [ -d "${dir}" ]; then
PATH="${PATH}:${dir}"
fi
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment