I am making a system info script which will output what version of CentOS a machine is running.
Currently, I have the following:
#!/bin/bash
distro=$(cat /etc/redhat-release)
echo "OS Version: $distro"
For the output, I get the following:
OS Version: CentOS Linux release 7.9.2009 (Core)
I would like to know how I can remove the (Core) section of the output.
uname? Otherwise you can usesedto remove some part of the string.unamedoesn't give me the Linux Distro info. I am reading up on thesedcommand, but still trying to figure out how to use it.