[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentooppc-dev
Subject:    Re: [gentoo-ppc-dev] Re: How to bring more ebuilds to ppc
From:       Nicolas Kaiser <nikai () nikai ! net>
Date:       2003-09-06 7:42:00
[Download RAW message or body]

* "Calum Selkirk" <cselkirk@xs4all.nl>:
> * Thanh Ly [lycander@ly-tech.com] [2003-09-04 01:24 -0400]:
> > cat find ... <rest of script>
> > done > ~/output.txt
> 
> humm .. no need for cat .. by default output will go to STDOUT but you
> rediect to a file like so:
> 
> for i in `find /usr/portage/${my_target_subdir} -name "*.ebuild" -print` ;
> do egrep -l "^KEYWORDS=\".*~ppc.*\"" $i >| output.txt ;
> done

Ah, but you could also increase speed vastly by not using a loop:
(with both of them reading from memory)

$ time for i in `find /usr/portage/ -name "*.ebuild" -print`; do egrep -l \
"^KEYWORDS=\".*~ppc.*\"" $i; done

real    1m8.892s
user    0m31.380s
sys     0m41.600s

$ time find /usr/portage/ -name "*.ebuild" |xargs egrep -l "^KEYWORDS=\".*~ppc.*\""

real    0m1.053s
user    0m0.810s
sys     0m0.900s


;) Cheers,
n.

-- 
Buffy: Vampires are creeps.
Giles: Yes. That's why one slays them.

--
gentoo-ppc-dev@gentoo.org mailing list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic