I know the commands to check the name of the Linux machine running on my machine. For example:
Ubuntu
cat /etc/version
CentOS
cat /etc/issue
How do I get the output from the terminal and compare to see if it is UBUNTU or CENTOS and perform the following commands?
apt-get install updates
or
yum update
Ubuntu 14.04
cat /etc/issue