John H. Robinson, IV wrote:
> James G. Sack (jim) wrote:
>> debian's package manager has a command recipe
>> dpkg -l [pattern]
>> which gives a nice tabulated 1-line output for installed packages
>> Name .. Version .. Description
>>
>> (I wonder if there might even be a way to get a (_big_) list
>> like this of available packages .. deb-gurus: ..?)
>
> $ grep -h -E '^(Package|Description): ' /var/lib/apt/lists/*Packages
>
> That will get you most of the way there. On my system, that results in
> 38,168 lines of output from 19,084 available packages (or, 579 printed
> pages assuming 66 lines per page).
>
> -john
>
> Add some perl and blamo!
>
> $ grep -h -E '^(Package|Description): ' /var/lib/apt/lists/*Packages|perl -ne
> '/^P\S+: (.*)/ and $p=$1;/^D\S+: (.*)/ and print "$p: $1\n"'
>
> Down to 290 printed pages!
Ahhh, thanks.
grep -h -E '^(Package|Description): \
'/var/lib/apt/lists/*Packages|head -4
gives
Package: apache2
Description: Next generation, scalable, extendable web server
Package: apache2-doc
Description: documentation for apache2
Making the perl a bit more meaningful.
(Maybe <someone> will offer a sed or awk version.)
Regards,
..jim (now to: apt-get install blamo!)
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list