Skip to content

Instantly share code, notes, and snippets.

@myano
Created October 21, 2017 14:48
Show Gist options
  • Save myano/56c883dd4f1100ba3a12087dd475bd28 to your computer and use it in GitHub Desktop.
Save myano/56c883dd4f1100ba3a12087dd475bd28 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
## Test for Debian
if [ -x "$(command -v lsb_release)" ]
then
lsb_release -a
fi
## Test for RHEL
if [ -e /etc/redhat-release ]
then
cat /etc/redhat-release
fi
## Test for Ubuntu
if [ -e /etc/lsb-release ]
then
cat /etc/lsb-release
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment