From owner-freebsd-current@FreeBSD.ORG Wed Jul 28 14:38:38 2010 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A1121065672 for ; Wed, 28 Jul 2010 14:38:38 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id D7B578FC0C for ; Wed, 28 Jul 2010 14:38:37 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id D594714DC362; Wed, 28 Jul 2010 16:38:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CNEs-0W0G0CT; Wed, 28 Jul 2010 16:38:33 +0200 (CEST) Received: from [192.168.1.105] (catv-80-99-92-167.catv.broadband.hu [80.99.92.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id AADF214DB7CE; Wed, 28 Jul 2010 16:38:33 +0200 (CEST) Message-ID: <4C5040E8.3050304@FreeBSD.org> Date: Wed, 28 Jul 2010 16:38:32 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: bf1783@gmail.com References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, "b. f." Subject: Re: BSD grep fixes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 14:38:38 -0000 Em 2010.07.27. 5:59, b. f. escreveu: > Other important differences between bsdgrep and GNU grep: > > The --include option in bsdgrep does not have the same effect as the > corresponding option in GNU grep -- in GNU grep, that option causes > _only_ those files matching the file inclusion pattern to be searched. > To obtain the same behavior in bsdgrep, one must issue something like > --exclude '*' --include pattern. > > The effect of multiple overlapping --include and --exclude options is > different in the two greps. It would be wise to add comments about > precedence of such options in the bsdgrep manpage, as is done, for > example, in bsdtar(1). > Thanks for bringing this up, I'll take a look and try to implement the same behaviour. And I will also document the behaviour. Gabor