From owner-cvs-ports@FreeBSD.ORG Sat Sep 25 23:29:29 2010 Return-Path: Delivered-To: cvs-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F76F1065670; Sat, 25 Sep 2010 23:29:29 +0000 (UTC) (envelope-from andy.kosela@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D248A8FC08; Sat, 25 Sep 2010 23:29:27 +0000 (UTC) Received: by mail-bw0-f54.google.com with SMTP id 15so3528741bwz.13 for ; Sat, 25 Sep 2010 16:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:reply-to:sender:to :subject:cc:message-id:references:in-reply-to:user-agent :mime-version:content-type:content-transfer-encoding; bh=yynCnrDiOayzVKNNdlAddYex5h4KbY252fkQFb4qlDk=; b=hG8eE6RUopCshBobodmtu9GEEVG8cJCdtouHWofsdQCz9YpwHsuJnNdMI7o17S8pG8 rDT2beCJEC0rCky6L3zTYJ88zuuHXo/sb9ThTp+b35gMHIkvpbwyEfS1n4JIWEVhwCxg c9CE/o+Asvz1XFWQFTK3vc9+NFdPye2wOn73A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:reply-to:sender:to:subject:cc:message-id:references :in-reply-to:user-agent:mime-version:content-type :content-transfer-encoding; b=rJVL1l84bYmuTnl8zaMiPs9f2iwdMRUPxQ9/L/+201ThlLWN44jks2TDH/XvMqQuBX YJ0SoVo480bg8L+BYVL3WRAO4YhtZzT7H5nuUvJOAMDpM4DGzBJD05hvAAPkD2xSReDw PAerIXX7w50qBHRfTYCHKwEmMOPnONrEtfOJ0= Received: by 10.204.102.75 with SMTP id f11mr3732641bko.10.1285455616510; Sat, 25 Sep 2010 16:00:16 -0700 (PDT) Received: from zork.lan (nat2-34.ghnet.pl [91.150.223.34]) by mx.google.com with ESMTPS id f10sm2867862bkl.5.2010.09.25.16.00.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 25 Sep 2010 16:00:15 -0700 (PDT) Date: Sun, 26 Sep 2010 01:01:35 +0200 From: Andy Kosela Sender: Andy Kosela To: dougb@FreeBSD.org, az@FreeBSD.org Message-ID: <4c9e7f4f.9pWCZ1OmPFLaLfcg%akosela@andykosela.com> References: <201009251455.o8PEtSxM036322@repoman.freebsd.org> <4C9E70E3.3000004@FreeBSD.org> In-Reply-To: <4C9E70E3.3000004@FreeBSD.org> User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/ports-mgmt/bpkg Makefile ports/ports-mgmt/bpkg/files bpkg.8 bpkg.sh.in X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: akosela@andykosela.com List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 23:29:29 -0000 Doug Barton 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. --Andy