Skip to content

Instantly share code, notes, and snippets.

@lopespm
Created February 16, 2016 01:43
Show Gist options
  • Save lopespm/6407349952bc8a1ff8fb to your computer and use it in GitHub Desktop.
Save lopespm/6407349952bc8a1ff8fb to your computer and use it in GitHub Desktop.
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