I am exploring the possibilities of grep-dctrl.
My current experiment is to try and show the description of a package that is not necessarily installed.
I have defined a package.describe function in my .bashrc that does the following:
Code: Select all
$ type package.describe
package.describe is a function
package.describe ()
{
apt-cache show "$1" | grep-dctrl -s Description-en -
}
$
Code: Select all
16:40:35 ~ -1- $ package.describe syslog-summary
Description-en: summarize the contents of a syslog log file
This program summarizes the contents of a log file written by syslog,
by displaying each unique (except for the time) line once, and also
the number of times such a line occurs in the input. The lines are
displayed in the order they occur in the input.
.
It is also possible to define some "ignore rules" using regular
expressions.
16:42:15 ~ -1- $
My failed attempts were :
1/
Code: Select all
16:37:50 ~ -1- $ grep-dctrl -PX syslog-summary /var/lib/apt/lists/*_Packages
Package: syslog-summary
Priority: optional
Section: universe/admin
Installed-Size: 80
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: David Paleino <dapal@debian.org>
Architecture: all
Version: 1.14-2
Depends: python (>= 2.5)
Recommends: python-magic
Filename: pool/universe/s/syslog-summary/syslog-summary_1.14-2_all.deb
Size: 9798
MD5sum: 1694a9b5722f7264f7fb9485c9367f8e
SHA1: c10d8bbf1fc65bcabd2094bd3510fe72925c8d2f
SHA256: 880d6b9b33ea43b137a0c86d8ed88f81674b83c31c4c9924825f7002c834dc9b
Description: summarize the contents of a syslog log file
Description-md5: 3f8fee696c08d1fc790b6611eadfbef1
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Package: syslog-summary
Priority: optional
Section: universe/admin
Installed-Size: 80
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: David Paleino <dapal@debian.org>
Architecture: all
Version: 1.14-2
Depends: python (>= 2.5)
Recommends: python-magic
Filename: pool/universe/s/syslog-summary/syslog-summary_1.14-2_all.deb
Size: 9798
MD5sum: 1694a9b5722f7264f7fb9485c9367f8e
SHA1: c10d8bbf1fc65bcabd2094bd3510fe72925c8d2f
SHA256: 880d6b9b33ea43b137a0c86d8ed88f81674b83c31c4c9924825f7002c834dc9b
Description: summarize the contents of a syslog log file
Description-md5: 3f8fee696c08d1fc790b6611eadfbef1
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
16:39:07 ~ -1- $
2/
Code: Select all
16:40:30 ~ -1- $ grep-aptavail -PX syslog-summary
Package: syslog-summary
Priority: optional
Section: universe/admin
Installed-Size: 80
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: David Paleino <dapal@debian.org>
Architecture: all
Version: 1.14-2
Depends: python (>= 2.5)
Recommends: python-magic
Filename: pool/universe/s/syslog-summary/syslog-summary_1.14-2_all.deb
Size: 9798
MD5sum: 1694a9b5722f7264f7fb9485c9367f8e
SHA1: c10d8bbf1fc65bcabd2094bd3510fe72925c8d2f
SHA256: 880d6b9b33ea43b137a0c86d8ed88f81674b83c31c4c9924825f7002c834dc9b
Description: summarize the contents of a syslog log file
Description-md5: 3f8fee696c08d1fc790b6611eadfbef1
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
16:40:35 ~ -1- $
Suggestions?