On Thu, Aug 02, 2001 at 04:52:00AM +0200, Janto Trappe wrote: > * Michael Wagner <michael@walfinger.de> [01-08-01 13:02]: > > > wird. Ich probiere gerade mit der /var/lib/dpkg/status ein bißchen > > rum. Damit müsste es sich IMHO am besten lösen lassen. Allerdings habe > > ACK. Da man ja auch noch eine Liste aller verfuegbaren Pakete > braucht und /var/lib/dpkg/available das gleiche Format hat, waere > das wirklich die beste Loesung. Ich habe am WE das package dpkg-awk gefunden, das könnte hier vielleicht einige Sachen einfacher machen. Die Description: Package: dpkg-awk Maintainer: Adam Heath <doogie@debian.org> Architecture: all Description: Gawk script to parse /var/lib/dpkg/{status,available} and Packages This script can parse the dpkg database files. It can do regular expressions on the fields, and only get what you want. It can also be made to output certain fields. As an added bonus, there is an option to sort the output. . 'dpkg-awk "Status: .* installed$" -- Package Version Status' will output all installed packages, with only the listed fields. 'dpkg-awk -f=/var/lib/dpkg/available "Package:^[aA].*" -- Package Version' will output all available packages that start with the letter 'A.' Gruss Grisu -- Michael Bramer - a Debian Linux Developer http://www.debian.org PGP: finger grisu@db.debian.org -- Linux Sysadmin -- Use Debian Linux Linux zu benutzen adelt nicht! Es bildet.
Attachment:
pgpK7mOR_3zxv.pgp
Description: PGP signature