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"
Ralph Angenendt
2009-Sep-21 13:08 UTC
[CentOS] sed (or other) magic to get RPM base names ?
On Mon, Sep 21, 2009 at 3:06 PM, Alan McKay <alan.mckay at gmail.com> wrote:> avahi-0.6.16-1.el5 > avahi-glib-0.6.16-1.el5 > > produce this : > > avahi > avahi-glibroot at knodd:~# rpm -qa --queryformat "%{name}\n" avahi\* avahi avahi-compat-libdns_sd avahi-glib root at knodd:~# Ralph
Christoph Maser
2009-Sep-21 13:08 UTC
[CentOS] sed (or other) magic to get RPM base names ?
Am Montag, den 21.09.2009, 15:06 +0200 schrieb Alan McKay:> 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, > -AlanNo need fro sed here use rpms --querformat switch, see manpage of rpm for details. Chris financial.com AG Munich head office/Hauptsitz M?nchen: Maria-Probst-Str. 19 | 80939 M?nchen | Germany Frankfurt branch office/Niederlassung Frankfurt: Messeturm | Friedrich-Ebert-Anlage 49 | 60327 Frankfurt | Germany Management board/Vorstand: Dr. Steffen Boehnert (CEO/Vorsitzender) | Dr. Alexis Eisenhofer | Dr. Yann Samson | Matthias Wiederwach Supervisory board/Aufsichtsrat: Dr. Dr. Ernst zur Linden (chairman/Vorsitzender) Register court/Handelsregister: Munich ? HRB 128 972 | Sales tax ID number/St.Nr.: DE205 370 553