Find latest RPM in directory

Alex <[email protected]> Thu, 20 May 2010 15:14:01 -0400
Newsgroups org.kernel.vger.linux-admin
Message-ID <[email protected]>
Hi all,

I'm not really a perl programmer, but know that perl and the perl-RPM
package would be really good at finding the latest RPM package among
all those in directory, and printing them out. Does anyone know of an
existing script that can do such a thing?

I'd like to be able to run something like:

# find-latest-pkg openssh-clients

and have it print out only the latest, instead of all ten versions
that may be in the directory. Even better, it would be great to print
out only the latest unique packages in directory, and not have to
specify the package name at all!

Perhaps more applicable to an RPM mailing list, or one specific to
perl-RPM, but hopefully you also consider this linux-admin material.

Thanks so much.
Best regards,
Alex