[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Regexp for RPM package name, given its file name?



Is there a regexp that will pick out the name of an RPM package, given
its file name?

The shell command

   egrep -o "^[^.]*-" /var/log/rpmpkgs

does a pretty good job, but includes part of the version with packages
that use numbers without periods (see below).

Thanks.

--- Vladimir

-- 
Vladimir G. Ivanovic
Palo Alto, CA 94306
+1 650 678 8014


----

atrpms-61-
atrpms-package-config-102-
bash-completion-20050721-
compat-gcc-32-
compat-libf2c-32-
compat-libgcc-296-
compat-libstdc++-296-
compat-libstdc++-33-
comps-4-
cryptix-asn1-20011119-
cryptix-asn1-javadoc-20011119-
ethtool-3-
f2c-20031026-
fedora-release-4-
fonts-ISO8859-2-
gimp-help-2-
gl-117-
Glide3-20050815-
Glide3-devel-20050815-
imap-libs-2004-
iozone-3-
iputils-20020927-
jal-20031117-
jing-20030619-
jing-demo-20030619-
jing-javadoc-20030619-
ksh-20050202-
less-382-
livna-release-4-
nss_ldap-239-
pam_ccreds-1-
perl-Tidy-20031021-
perltidy-20031021-
procinfo-18-
rpm-macros-rpmforge-0-
tetex-unicode-0-
udev-063-
vrfy-990522-
wireless-tools-28-
xemacs-sumo-20050715-
xemacs-sumo-el-20050715-
xemacs-sumo-info-20050715-
xen-2-
xmltex-20020625-
xt-dash-javadoc-20020426-
xterm-200-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]