Skip to content

Instantly share code, notes, and snippets.

@hartsock
Created October 17, 2018 13:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hartsock/c7a4c9f5ed08cfebe39bb0f5bb32e58d to your computer and use it in GitHub Desktop.
Save hartsock/c7a4c9f5ed08cfebe39bb0f5bb32e58d to your computer and use it in GitHub Desktop.
Shawn's Bash Profile
if [ -d $HOME/bin ]; then export PATH=$HOME/bin:$PATH ; fi
# interactive only below this point
if [ -t 1 ]; then
export SOURCE_IP=`echo $SSH_CONNECTION | awk '{print $1}'`
export CURRENT_IP=`echo $SSH_CONNECTION | awk '{print $3}'`
if [[ ! -z "${CURRENT_IP}" ]]; then
export PS1="${CURRENT_IP}:\w $ "
fi
echo ""
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment