Created
August 29, 2022 18:31
-
-
Save devenes/ec4e0b25fd58b9c3f324ad2c02e616db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $(cat /etc/os-release | awk -F '=' '/^ID=/ {print $2}' | cut -d '"' -f 2) = "amzn" ]; then | |
echo "Amazon Linux" | |
elif [ $(cat /etc/os-release | awk -F '=' '/^ID=/ {print $2}' | cut -d '"' -f 2) = "ubuntu" ]; then | |
echo "Ubuntu" | |
else | |
echo "Unsupported OS" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment