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.
Thank you for your help.