Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Print out of where your OSX Terminal bash $PATH is being defined
#!/bin/bash
# Simple script to print out where your PATH variable is getting defined on for your OSX bash Terminal
#
echo -e "------------------------------------------------"
echo -e "------- ~/.bash_profile -------"
echo -e "------------------------------------------------"
cat ~/.bash_profile | grep PATH=
echo -e ""
echo -e "------------------------------------------------"
echo -e "------- ~/.bash_login -------"
echo -e "------------------------------------------------"
cat ~/.bash_login | grep PATH=
echo -e ""
echo -e "------------------------------------------------"
echo -e "------- ~/.bashrc -------"
echo -e "------------------------------------------------"
cat ~/.bashrc | grep PATH=
echo -e ""
echo -e "------------------------------------------------"
echo -e "------- ~/.MacOSX/environment.plist -------"
echo -e "------------------------------------------------"
cat ~/.MacOSX/environment.plist
echo -e ""
echo -e "------------------------------------------------"
echo -e "------- /etc/paths -------"
echo -e "------------------------------------------------"
cat /etc/paths
echo -e ""
echo -e "------------------------------------------------"
echo -e "------- Inside folder: /etc/paths.d/ -------"
echo -e "------------------------------------------------"
cat /etc/paths.d/*
echo -e ""
echo -e "------------------------------------------------"
echo -e "~/.tcshrc (/opt/local/bin, etc, here by MacPorts)"
echo -e "------------------------------------------------"
cat ~/.tcshrc | grep PATH=
echo -e ""
echo -e "------------------------------------------------"
echo -e "------- ~/.cshrc -------"
echo -e "------------------------------------------------"
cat ~/.cshrc | grep PATH=
echo -e ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.