X-Loop: help-debbugs@HIDDEN Subject: bug#26904: Wishlist: Tell grep to stop when a line matches something else. Resent-From: LA-notifications@HIDDEN Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-grep@HIDDEN Resent-Date: Sat, 13 May 2017 05:57:01 +0000 Resent-Message-ID: <handler.26904.B.14946549773112 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 26904 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 26904 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-grep@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.14946549773112 (code B ref -1); Sat, 13 May 2017 05:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 May 2017 05:56:17 +0000 Received: from localhost ([127.0.0.1]:41678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1d9Q2K-0000o8-Ng for submit <at> debbugs.gnu.org; Sat, 13 May 2017 01:56:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <LA-notifications@HIDDEN>) id 1d9PKk-0008AD-Ny for submit <at> debbugs.gnu.org; Sat, 13 May 2017 01:11:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <LA-notifications@HIDDEN>) id 1d9PKe-0001dx-QZ for submit <at> debbugs.gnu.org; Sat, 13 May 2017 01:11:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34209) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <LA-notifications@HIDDEN>) id 1d9PKe-0001dj-Mk for submit <at> debbugs.gnu.org; Sat, 13 May 2017 01:11:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <LA-notifications@HIDDEN>) id 1d9PKd-0005hR-Lc for bug-grep@HIDDEN; Sat, 13 May 2017 01:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <LA-notifications@HIDDEN>) id 1d9PKX-0001ZO-OI for bug-grep@HIDDEN; Sat, 13 May 2017 01:11:04 -0400 Received: from mx2.xecu.net ([216.127.136.244]:59417 helo=mail2.xecu.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <LA-notifications@HIDDEN>) id 1d9PKX-0001VT-J3 for bug-grep@HIDDEN; Sat, 13 May 2017 01:11:01 -0400 Received: from mail2.xecu.net (localhost [127.0.0.1]) by mail2.xecu.net (Postfix) with ESMTP id 62B54892814 for <bug-grep@HIDDEN>; Sat, 13 May 2017 01:10:53 -0400 (EDT) X-Virus-Scanned: amavisd-new at xecu.net Received: from webmail.xecu.net (webmail.xecu.net [216.127.136.160]) (Authenticated sender: la-notifications@HIDDEN) by mail2.xecu.net (Postfix) with ESMTPA id 665F6892822 for <bug-grep@HIDDEN>; Sat, 13 May 2017 01:10:52 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 13 May 2017 01:10:52 -0400 From: LA-notifications@HIDDEN Message-ID: <e8682c703e618fdec15feb426783f80c@HIDDEN> X-Sender: LA-notifications@HIDDEN User-Agent: Roundcube Webmail/1.0.7 X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Sat, 13 May 2017 01:56:15 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -4.0 (----) Hello. I wish I could tell grep to stop searching in a file when it gets to a line matching something else. So if grep is searching a file for 'foo' then finds a line matching 'bar', stop searching for 'foo'. It would help me out a lot when searching for things in my perl modules where I do not want my perl pod searched. LA
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: LA-notifications@HIDDEN Subject: bug#26904: Acknowledgement (Wishlist: Tell grep to stop when a line matches something else.) Message-ID: <handler.26904.B.14946549773112.ack <at> debbugs.gnu.org> References: <e8682c703e618fdec15feb426783f80c@HIDDEN> X-Gnu-PR-Message: ack 26904 X-Gnu-PR-Package: grep Reply-To: 26904 <at> debbugs.gnu.org Date: Sat, 13 May 2017 05:57:01 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-grep@HIDDEN If you wish to submit further information on this problem, please send it to 26904 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 26904: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D26904 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#26904: Wishlist: Tell grep to stop when a line matches something else. Resent-From: Shlomi Fish <shlomif@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-grep@HIDDEN Resent-Date: Sat, 13 May 2017 06:37:02 +0000 Resent-Message-ID: <handler.26904.B26904.14946573786575 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 26904 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: LA-notifications@HIDDEN Cc: 26904 <at> debbugs.gnu.org Received: via spool by 26904-submit <at> debbugs.gnu.org id=B26904.14946573786575 (code B ref 26904); Sat, 13 May 2017 06:37:02 +0000 Received: (at 26904) by debbugs.gnu.org; 13 May 2017 06:36:18 +0000 Received: from localhost ([127.0.0.1]:41700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1d9Qf3-0001hz-On for submit <at> debbugs.gnu.org; Sat, 13 May 2017 02:36:17 -0400 Received: from gateway30.websitewelcome.com ([50.116.126.1]:39658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <shlomif@HIDDEN>) id 1d9Qf1-0001hp-8c for 26904 <at> debbugs.gnu.org; Sat, 13 May 2017 02:36:15 -0400 Received: from cm3.websitewelcome.com (unknown [108.167.139.23]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 0090A11CF9 for <26904 <at> debbugs.gnu.org>; Sat, 13 May 2017 01:36:13 -0500 (CDT) Received: from gator4065.hostgator.com ([192.185.4.76]) by cm3.websitewelcome.com with id KiX91v0021eQXhs01iXANY; Sat, 13 May 2017 01:31:12 -0500 Received: from igld-84-229-99-155.inter.net.il ([84.229.99.155]:33444 helo=telaviv1.shlomifish.org) by gator4065.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from <shlomif@HIDDEN>) id 1d9Qa4-000LyW-Mu; Sat, 13 May 2017 01:31:08 -0500 Received: from telaviv1.shlomifish.org (telaviv1.shlomifish.org [127.0.0.1]) by telaviv1.shlomifish.org (Postfix) with ESMTP id 63103260040; Sat, 13 May 2017 09:31:06 +0300 (IDT) Date: Sat, 13 May 2017 09:31:05 +0300 From: Shlomi Fish <shlomif@HIDDEN> Message-ID: <20170513093105.31f48ce5@HIDDEN> In-Reply-To: <e8682c703e618fdec15feb426783f80c@HIDDEN> References: <e8682c703e618fdec15feb426783f80c@HIDDEN> X-Mailer: Claws Mail 3.15.0 (GTK+ 2.24.31; x86_64-mageia-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4065.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - shlomifish.org X-BWhitelist: no X-Source-IP: 84.229.99.155 X-Exim-ID: 1d9Qa4-000LyW-Mu X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: igld-84-229-99-155.inter.net.il (telaviv1.shlomifish.org) [84.229.99.155]:33444 X-Source-Auth: shlomif@HIDDEN X-Email-Count: 2 X-Source-Cap: c2hsb21pZjtzaGxvbWlmO2dhdG9yNDA2NS5ob3N0Z2F0b3IuY29t X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.7 (/) Hi LA, On Sat, 13 May 2017 01:10:52 -0400 LA-notifications@HIDDEN wrote: > Hello. >=20 > I wish I could tell grep to stop searching in a file when it gets to a=20 > line matching something else. So if grep is searching a file for 'foo'=20 > then finds a line matching 'bar', stop searching for 'foo'. It would=20 > help me out a lot when searching for things in my perl modules where I=20 > do not want my perl pod searched. >=20 It may be out of the scope of GNU grep, but should be doable in perl -ln or= sed. E.g (untested): perl -ln -E '/bar/?exit:/foo/?say:0' Regards, Shlomi Fish > LA >=20 >=20 >=20 --=20 ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ http://www.shlomifish.org/humour/bits/facts/Emma-Watson/ A wiseman can learn from a fool much more than a fool can ever learn from a wiseman. =E2=80=94 http://en.wikiquote.org/wiki/Cato_the_Elder Please reply to list if it's a mailing list post - http://shlom.in/reply .
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.