Parse RPM version string in Bash
I am very new to bash scripting and I am trying to break down a rpm version string into four separate strings.
Basically I have a Version string I retrieve from a file( for example sake lets say it is "1.0.1-05" and I would like to break it down and store it into four separte strings/or numbers. I think I might be able to use the awk/sed command to do this but I can not figure out the usage.
#Perform sed awk to Parse out
#version values as followes
Any suggestions or help will be greatly appreciate.