Skip to content

Instantly share code, notes, and snippets.

@jeanlaurent
Created November 20, 2015 08:47
Show Gist options
  • Save jeanlaurent/43dee3e95e0d4e6f51aa to your computer and use it in GitHub Desktop.
Save jeanlaurent/43dee3e95e0d4e6f51aa to your computer and use it in GitHub Desktop.
FULL_BASH_VERSION=`bash --version | head -1 | cut -d' ' -f4 | cut -d'.' -f1-3`
BASH_VERSION=`bash --version | head -1 | cut -d' ' -f4 | cut -d'.' -f1`
echo "Current bash version is $FULL_BASH_VERSION"
if [[ $BASH_VERSION -ge 4 ]]; then
echo "Your BASH version is ok"
else
echo "Your BASH version is too low"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment