Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Shell: test for bash or zsh
if [ -n "$ZSH_VERSION" ]; then
# assume Zsh
elif [ -n "$BASH_VERSION" ]; then
# assume Bash
else
# asume something else
fi
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.