Detecting the Running Shell
Detecting the Running Shell
if [ -n "$BASH_VERSION" ]; then
echo "Running GNU Bash version $BASH_VERSION"
elif [ -n "$ZSH_VERSION" ]; then
echo "Running Zsh version $ZSH_VERSION"
else
echo "Running standard POSIX /bin/sh"
fi