I am trying to clean a list containing packages. I wish to remove the package revisions, leaving the package names only.
I see every package has naming convention like this: package-name-majorver-minorver , etc: openssl-1.0.1e-57.0.5.el6 . I want openssl only, not -1.0.1e-57.0.5.el6
So far I have this
sed 's/^.*-//', but this doesn't work obviously.