Skip to content

Instantly share code, notes, and snippets.

@hamiltont
Last active February 3, 2019 22:41
Show Gist options
  • Save hamiltont/8c92a17c247728f7bb79427cc0c7cb3e to your computer and use it in GitHub Desktop.
Save hamiltont/8c92a17c247728f7bb79427cc0c7cb3e to your computer and use it in GitHub Desktop.
Dump basic shell description on .bashrc / .bash_profile load
# Dump some basic info
# See https://unix.stackexchange.com/a/26782/54389
[[ $- == *i* ]] && i='interactive' || i='non-interactive'
shopt -q login_shell && l='login' || l='non-login'
echo ".bash_profile: Running for $i,$l shell"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment