On 9/25/2010 4:01 PM, Andy Kosela wrote:
Doug Barton<[email protected]> wrote:
FYI, it's never necessary to do 'cat $file | grep' you can always do
'grep $file' instead.
The bit on finding the directory for a port (the ones that start with
pwd= in the diff) can also be done a bit more efficiently with this at
the beginning:
grep -m1 "/$e|" INDEX
Yeah I agree, will incorporate your suggestions into the code. However
-m1 option is not useful here as:
$ grep -m1 "/$tin|" INDEX
lists only zh-tin (first match), where first and foremost we are looking
for tin.
I did not review the code in depth so if multiple matches are valuable
to you, then certainly the -m1 option is not relevant. If however you're
looking for a unique value in the INDEX file (specified as
category/portname) then it would be.
hth,
Doug
--
... and that's just a little bit of history repeating.
-- Propellerheads
Improve the effectiveness of your Internet presence with
a domain name makeover! http://SupersetSolutions.com/
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[email protected]"