Skip to content

Instantly share code, notes, and snippets.

@myano
Created Oct 21, 2017
Embed
What would you like to do?
#!/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