[CentOS] sed (or other) magic to get RPM base names ?

Alan McKay

alan.mckay at gmail.com
Mon Sep 21 13:06:06 UTC 2009


Hey folks,

Once upon a time I saw some sed magic to take the output of "rpm -qa"
and strip away all the version info to give just the RPM base names.

And of course I forgot to note it :-/   And have not been able to
replicate it myself.

e.g. from this :

avahi-0.6.16-1.el5
avahi-glib-0.6.16-1.el5

produce this :

avahi
avahi-glib

thanks,
-Alan

-- 
“Don't eat anything you've ever seen advertised on TV”
         - Michael Pollan, author of "In Defense of Food"



More information about the CentOS mailing list