[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting a list of installed packages

Colin Watson wrote:

> John Carline <jtc@stic.net> wrote:
> >Robert Guthrie wrote:
> >> On Wednesday 15 November 2000 11:43, Moritz Schulte wrote:
> >> > Robert Guthrie <rguthrie@pobox.com> writes:
> >> > > dpkg -l * | egrep "^ii" | grep -i kde
> >> >
> >> > You can do it with awk: dpkg -l | awk '{ print $2 " " $3 }'
> >>
> >> That didn't work either.  It seems that anything I run through a pipe gets
> >> truncated.  I'm not sure why.  If I just run dpkg -l all by itself, I get a
> >> nicely spaced output that I could cut and past from, but that would require
> >> me to do the work that my computer should do for me ;-).  Any suggestions?
> >
> >I'm not certain what you mean by truncated (cut off?)
> He means that he sees the following:
> ii  ksirc          2.0-final-0.po IRC Client based on QT and KDE
> ii  ksirtet        2.0-final-0.po Tetris and Puyo-Puyo games for KDE
> ... instead of versions 2.0-final-0.potato.3 and 2.0-final-0.potato.2
> respectively.

Ahh! I see. You're probably right, but that's caused by the dpkg command isn't it -
not the pipe?  Didn't 'dpkg - l'  by itself produce what was wanted?

If the full version is what's needed, it's listed in /var/lib/dpkg/status. The dpkg
command cuts it off at 14 characters so the real question may be "is there a way to
make dpkg  produce the entire version field?"

I don't think so, but I could easily be wrong.



Powered by the Penguin

Reply to: