Google is your friend.
http://panuganty.tripod.com/debiantips/packaging.htm

More specifically,
apt-get install dpkg-awk
dpkg-awk "Status: .* installed$" -- Package | cut -d: -f2


On Tue, 18 Mar 2003, John Hawley wrote:

> Say, a silly little question to the Debian gurus.
> 
> Anyone know why my dpkg listing fields get truncated when I direct the
> output to a file?  This is from xterm running in a bash shell.  I'd like
> to be able to have a copy of the current package listing for all my
> servers and its irritating to see the package names or version number
> cut off.
> 
> 
> root at rho1:cgi-bin# dpkg --list 'communicator*
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
> ||/ Name                                 Version                              Description
> +++-====================================-====================================-========================================================================================
> ii  communicator                         4.77-2                               Meta package that depends on other packages
> ii  communicator-base-477                4.77-2                               Communicator base support for version 4.77
> un  communicator-browser-477             <none>                               (no description available)
> un  communicator-nethelp-477             <none>                               (no description available)
> ii  communicator-smotif-477              4.77-2                               Netscape Communicator 4.77 (static Motif)
> un  communicator-spellchk-477            <none>                               (no description available)
> root at rho1:cgi-bin# dpkg --list 'communicator*' > dpkg.lst
> root at rho1:cgi-bin# cat dpkg.lst 
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
> ||/ Name           Version        Description
> +++-==============-==============-============================================
> ii  communicator   4.77-2         Meta package that depends on other packages
> ii  communicator-b 4.77-2         Communicator base support for version 4.77
> un  communicator-b <none>         (no description available)
> un  communicator-n <none>         (no description available)
> ii  communicator-s 4.77-2         Netscape Communicator 4.77 (static Motif)
> un  communicator-s <none>         (no description available)
> 
> 
> 
> -- 
> John Hawley
> BGEA/ITS
> Network Engineer
> 612.335.1334
> jhawley at bgea.org

-- 
Clay Fandre				email: clay at fandre.com
					PGP Key ID: 0x50DBBB60

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list