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

Re: mashup "apt-cache search <SearchTerm>" & "dpkg -l" - HowTo? ; jor



On Sun, Jun 27, 2010 at 4:23 PM, giovanni_re <john_re@fastmail.us> wrote:
> Thanks Aaron & Tom -
> That's progress, but not there yet. ;)
> Further suggestion? Thanks :)

You're welcome.

I assumed that you only wanted installed packages because I thought
that "dpkg -l" was meant for installed packages...

For all packages, run
aptitude -F "%a%c %p %v %d" search parted
(I have inverted the action and current states of my first post to use
"dpkg -l"'s order)

Or, just with dpkg
dpkg -l "*parted*"

Or with apt-cache (using Aaron's post)
dpkg -l $(apt-cache search parted | awk '{print $2}' | tr '\n' ' ')

So you could also run, to get the same output as with "dpkg -l"
dpkg -l $(aptitude search -F "%p" parted | tr '\n' ' ')

I am not sure that "tr ..." is needed but I don't have a Debian box at
hand to check.


Reply to: