/usr/ports/distfiles maintenance

Oliver Lehmann lehmann at ans-netz.de
Fri May 27 10:09:47 PDT 2005


Thierry Thomas wrote:

> Le Ven 27 mai 05 à 15:27:59 +0200, Oliver Lehmann <lehmann at ans-netz.de>
>  écrivait :
> > > What about:
> > > 
> > > find . -name distinfo | xargs grep MD5 | awk '{ print $2 }' | sed -e 's/[()]//g'
> > 
> > find . -name distinfo -type f | xargs awk -F'[()]' '/MD5/ {print $2}' 
> 
> find . -name distinfo -type f -exec awk -F'[()]' '/MD5/ {print $2}' {} \;
> 
> Next one?

yeah -exec creates more systemload then xargs. That is because -exec
starts one awk for each file it finds. Awk through xargs is called not so
often because it processes more then one file each time it gets called
(because xargs passes more then one file over to it). Thats why xargs is
in most cases cooler then -exec ;) 

-- 
 Oliver Lehmann
  http://www.pofo.de/
  http://wishlist.ans-netz.de/


More information about the freebsd-ports mailing list