WordPress package
Peter Garrett
peter.garrett at optusnet.com.au
Sun Apr 15 20:52:27 UTC 2007
On Sun, 15 Apr 2007 20:12:17 +0200
Nils Kassube <kassube at gmx.net> wrote:
> dpkg -l|while read i n r;do apt-cache madison $n|grep universe;done|cut -d\| -f1
I get duplicate lines from the output here - what about something like
for each in $(dpkg --get-selections | grep install | cut -f1) ; do apt-cache madison $each | grep universe ; done | cut -d\| -f1 | sort | uniq > universe-installed.list
"time" reports
real 5m52.071s
user 3m26.669s
sys 2m21.925s
Comparison:
$ time dpkg -l|while read i n r;do apt-cache madison $n|grep universe;done|cut -d\| -f1 | sort | uniq > dpkg-universe
real 6m3.550s
user 3m28.509s
sys 2m21.753s
peter at prospero:~ $ diff dpkg-universe universe-installed.list
peter at prospero:~ $
So it looks like both give the same result ...
There must be a quicker way though :-)
Peter
More information about the ubuntu-users
mailing list