1 |
* Nicolas Kaiser [nikai@×××××.net] [2003-09-06 09:42 +0200]: |
2 |
|
3 |
> > for i in `find /usr/portage/${my_target_subdir} -name "*.ebuild" -print` ; |
4 |
> > do egrep -l "^KEYWORDS=\".*~ppc.*\"" $i >| output.txt ; |
5 |
> > done |
6 |
> |
7 |
> Ah, but you could also increase speed vastly by not using a loop: |
8 |
> (with both of them reading from memory) |
9 |
> |
10 |
> $ time for [loop] |
11 |
> real 1m8.892s |
12 |
> user 0m31.380s |
13 |
> sys 0m41.600s |
14 |
> |
15 |
> $ time find [xargs] |
16 |
> |
17 |
> real 0m1.053s |
18 |
> user 0m0.810s |
19 |
> sys 0m0.900s |
20 |
|
21 |
Your probably right but I wouldn't say `time` is a good benchmark, you |
22 |
will have the results of the egrep cashed from the first run .. you |
23 |
cheat ;) |
24 |
|
25 |
Anyhow .. I took sometime today to update the script. You can now search |
26 |
for -arch and I attempted to impliment no-arch (that is the abscence of |
27 |
the search_string from the ebuilds) .. It doesn't work :P and I'm not |
28 |
quite sure, nor do I have time right now to figure out, why exactly. |
29 |
Prehaps someone else has a clue? It's not alltogher neccessary but would |
30 |
round the script off and so any pointers welcome (also the sed could |
31 |
probably be less verbose). |
32 |
|
33 |
best |
34 |
|
35 |
cal |