Gentoo Archives: gentoo-dev

From: Vitaly Ivanov <im@×××.ru>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Not happy offline user yet :-)
Date: Tue, 02 Mar 2004 16:38:50
Message-Id: 4044B92F.6010303@rle.ru
In Reply to: Re: [gentoo-dev] Not happy offline user yet :-) by Xavier Neys
1 Xavier Neys wrote:
2 > How about this one-liner?
3 >
4 > $ emerge -pf world 2>&1 |awk '/md5 src_uri ;-)/{okfiles[$NF]=1}
5 > /\/[:alnum:]/{nf=split($1,a,"/");wanted[a[nf]]=$0} END {for (f in
6 > wanted) if (!(f in okfiles)) {print wanted[f]} }'
7 >
8 > It displays the required files minus those tested OK against the md5
9 > checksum.
10 > Use {print f} instead of {print wanted[f]} at the end to get file names
11 > without path, or even {split(wanted[f],a);print a[1]} to display the
12 > first path only.
13 >
14 > You can also save the script to a file, say 'fifi' and pipe into awk -f
15 > fifi
16 Wow! It's coooool!
17 I don't understand how it work, but it work!
18 Thanks all for your help!
19
20
21 --
22 gentoo-dev@g.o mailing list