TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Searching for DEB's



Try this little bash script:

---------------------------------------------------------------------
#!/bin/bash
# Script: search-debs
# Syntax: search-debs <grep matching string>

echo "Packages containing the string: ${1}"
apt-cache dump | grep "^Package" | grep ${1} | awk '{print $2}'
---------------------------------------------------------------------

The command 'dpkg -l | grep <whatever>' will do some crude matching as well,
but it won't give you the full package name.  'dpkg -l' does contain some
description information that is nice to have.

Doing a search on a package description can be done by editing the
/var/lib/dpkg/available file.  JUST DON'T DELETE THE FILE. ;-)  Could be bad.

-- 
^chewie

PGP signature