On Wed, Feb 27, 2002 at 01:28:05PM +0100, Phil wrote: > I've begun to write sth that output a LaTeX report giving details > about the hardware...[snipped for brevity]...
Very cool. Perl or Python? Parsing the fai install logs?
> Does this already exists ?
Not that I know of.
> Btw, do you know a simple way to get the equivalent of dpkg -l (to get
> the list of packages installed with their version) but which is not
> truncated. (For the moment I have to parse myself
> /var/lib/dpkg/status.)
#!/bin/sh
dpkg=/bin/dpkg
# Set the column width
COLUMNS=132
export COLUMNS
# Run dpkg -l
$dpkg -l $@
Otherwise, I do a simple grep or egrep for info on specific packages:
#!/bin/sh
grep=/bin/grep
status=/var/lib/dpkg/status
# grep for a package and show status
do_grep() {
grep -A1 -E "Package:\.\*${1:-''}\$" $status
}
[ $# -eq 0 ] && {
do_grep
exit 0
}
while true
do
do_grep $1
[ $# -lt 2 ] && break
shift
done
Use awk to format, or search the current debian archives for a tool with
apt-cache search 'REGEX'.
--
Chad Walstrom <[EMAIL PROTECTED]> | a.k.a. ^chewie
http://www.wookimus.net/ | s.k.a. gunnarr
Get my public key, ICQ#, etc. $(mailx -s 'get info' [EMAIL PROTECTED])
msg00516/pgp00000.pgp
Description: PGP signature
