I can get the 5.8 or 6.4 number from looking at /etc/redhat-release
, but I don't know how to get it converted from 5.8
to just 5
. The command I'm using so far is:
cat /etc/redhat-release | awk {'print $7'}
Which produces the 5.8
. How would I go about getting the single digit integer from that using bash?