From MAILER-DAEMON Mon May 01 02:54:08 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d55Dk-00052y-DG for mharc-bug-grep@gnu.org; Mon, 01 May 2017 02:54:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d55Dh-00052m-Qp for bug-grep@gnu.org; Mon, 01 May 2017 02:54:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d55De-0005lj-Om for bug-grep@gnu.org; Mon, 01 May 2017 02:54:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50239) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d55De-0005lD-AR for bug-grep@gnu.org; Mon, 01 May 2017 02:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d55Dd-0001ls-VB for bug-grep@gnu.org; Mon, 01 May 2017 02:54:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26726: Support grepping multi-lines fixed-strings Resent-From: "ziyunfei" <446240525@qq.com> Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 01 May 2017 06:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26726 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 26726@debbugs.gnu.org X-Debbugs-Original-To: "bug-grep" Received: via spool by submit@debbugs.gnu.org id=B.14936215936742 (code B ref -1); Mon, 01 May 2017 06:54:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 May 2017 06:53:13 +0000 Received: from localhost ([127.0.0.1]:48438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d55Cr-0001kf-13 for submit@debbugs.gnu.org; Mon, 01 May 2017 02:53:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59503) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <446240525@qq.com>) id 1d54zF-0001Qx-9j for submit@debbugs.gnu.org; Mon, 01 May 2017 02:39:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <446240525@qq.com>) id 1d54z9-00037g-8b for submit@debbugs.gnu.org; Mon, 01 May 2017 02:39:04 -0400 Received: from lists.gnu.org ([2001:4830:134:3::11]:52378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <446240525@qq.com>) id 1d54z9-00037c-5a for submit@debbugs.gnu.org; Mon, 01 May 2017 02:39:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <446240525@qq.com>) id 1d54z8-0001eE-1C for bug-grep@gnu.org; Mon, 01 May 2017 02:39:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <446240525@qq.com>) id 1d54z3-00037L-4j for bug-grep@gnu.org; Mon, 01 May 2017 02:39:02 -0400 Received: from smtpbg65.qq.com ([103.7.28.233]:41889) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <446240525@qq.com>) id 1d54z2-00037B-AX for bug-grep@gnu.org; Mon, 01 May 2017 02:38:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1493620728; bh=SG6QdORTaMU+YLFZU6sQmvrdzsgcUjHNod7auq83ruA=; h=From:To:Subject:Mime-Version:Content-Type:Content-Transfer-Encoding:Date:Message-ID; b=PCyqrcpqgZxCiDoecvn3RsCu6z3ey/m9ygpCofx2ZCHllt1tG86/bGpl9IIa7mTEG bdZi5Omz16QHKQtUK/aaEakU6A5KektCfPPvZz+i9OlCapw/kbpATqE6+eRYq3mVjb GE3Cx+EyNf+kjLlLxqjtENmWmpui0/Jh3bxA7UK8= X-QQ-FEAT: 5nAP71ObQpVkxOyhHZuQboKCawLVmGrtdfgVgqafT6vEgK2uQIo7dwHZ4Lfwl Fk199+dI5TSKxf7/6du5rDn2XmADV0ThnUendi+ziH0kiuR622imwZ99+sDyysIftU+r8kE SQASXiHreUGj85xPzcW6MvGfA5MpVaWihxqX08u/DgHaN3iqJ/x2bIYbeW0PWR1pYoZN+Ns zYDmVUYhG8j8vQtqBK39X5OjmaUk56O+dh3EucpsU5tQlPAcmXwaqqGspC/F83HkV1ceeVL xmsA== X-QQ-SSF: 000000000000004000000000000000E X-HAS-ATTACH: no X-QQ-BUSINESS-ORIGIN: 2 X-Originating-IP: 183.157.167.43 X-QQ-STYLE: X-QQ-mid: webmail323t1493620726t5036747 From: "ziyunfei" <446240525@qq.com> Mime-Version: 1.0 Date: Mon, 1 May 2017 14:38:46 +0800 X-Priority: 3 Message-ID: X-QQ-MIME: TCMime 1.0 by Tencent X-Mailer: QQMail 2.x X-QQ-Mailer: QQMail 2.x X-QQ-SENDSIZE: 520 Feedback-ID: webmail:qq.com:bgforeign:bgforeign1 X-QQ-Bgrelay: 1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Mon, 01 May 2017 02:53:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 May 2017 06:54:06 -0000 SSBoYXZlIHRoZSBzYW1lIG5lZWQgYXMgaHR0cDovL3N0YWNrb3ZlcmZsb3cuY29tL3F1ZXN0 aW9ucy8xNDYzMTc5NC9jaGVjay1pZi1maWxlLWNvbnRhaW5zLXNvbWUtdGV4dC1ub3QtcmVn ZXgtaW4tdW5peCNjb21tZW50MjA0Mzg3NTdfMTQ2MzE4MzIuDQoNCg0KJCBjYXQgZmlsZQ0K Zm9vDQpiYXINCg0KJCBlY2hvICIkZml4ZWRfc3RyaW5nIg0KYmFyDQpmb28NCg0KJCBncmVw IC1GenEgIiRmaXhlZF9zdHJpbmciIGZpbGUgJiYgZWNobyAiTWF0Y2hlZCIgfHwgZWNobyAi Tm90IG1hdGNoZWQiDQpNYXRjaGVkICMgZmFsc2UgcG9zaXRpdmUsIC16IGRvZXNuJ3QgYXBw bHkgdG8gLUYNCg0KDQokIFtbICIkKGNhdCBmaWxlKSIgPSAqIiRmaXhlZF9zdHJpbmciKiBd XSAmJiBlY2hvICJNYXRjaGVkIiB8fCBlY2hvICJub3QgbWF0Y2hlZCINCm5vdCBtYXRjaGVk ICMgbXkgd29ya2Fyb3VuZA== From MAILER-DAEMON Mon May 01 08:49:07 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d5AlG-0004cM-W4 for mharc-bug-grep@gnu.org; Mon, 01 May 2017 08:49:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5AlF-0004c7-A1 for bug-grep@gnu.org; Mon, 01 May 2017 08:49:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5AlC-0005dH-7C for bug-grep@gnu.org; Mon, 01 May 2017 08:49:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50419) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d5AlC-0005d9-3r for bug-grep@gnu.org; Mon, 01 May 2017 08:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d5AlB-0003Rj-PI for bug-grep@gnu.org; Mon, 01 May 2017 08:49:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26726: Support grepping multi-lines fixed-strings Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 01 May 2017 12:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26726 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: ziyunfei <446240525@qq.com> Cc: 26726@debbugs.gnu.org Received: via spool by 26726-submit@debbugs.gnu.org id=B26726.149364292813228 (code B ref 26726); Mon, 01 May 2017 12:49:01 +0000 Received: (at 26726) by debbugs.gnu.org; 1 May 2017 12:48:48 +0000 Received: from localhost ([127.0.0.1]:48618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5Aky-0003RI-2n for submit@debbugs.gnu.org; Mon, 01 May 2017 08:48:48 -0400 Received: from mail-ua0-f176.google.com ([209.85.217.176]:34781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5Akw-0003R6-GE for 26726@debbugs.gnu.org; Mon, 01 May 2017 08:48:46 -0400 Received: by mail-ua0-f176.google.com with SMTP id g49so5395833uaa.1 for <26726@debbugs.gnu.org>; Mon, 01 May 2017 05:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cCHdwi4IIAlWYYY+trPg11YKmfFHK3m/VcsABuiSuk4=; b=ZY/hglT1/hLtXFcX0HC5Fk01rlWeTijHmVBiBMUwl9YYGMxHuRq1OLhz9dlgNyLSOy TNROG0c8pi2mQwVAak8feDMDPpNNevIFANCPmVAszZyTIM9HbFnsymep1jozstlW5YOb ulIwZmCsqzBUH4H2PJObSlcjvf7irzT6aWFKysh+ro7AxGbJ82dBbru6FhH7cFqjL6+t LuHNJdxAEuvRd9YX5EWo+5dBfE27DQdL8cTLNn2+2/eXwMWKnglcMgcjdB2XgTglJeuc UeZWaxYULYsKdWRa50ajJCwKkFtO060UQN6QGy98Iv9x7m2FqJW2D4CC+J3Ou4ivXpcR 2pEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cCHdwi4IIAlWYYY+trPg11YKmfFHK3m/VcsABuiSuk4=; b=QtRnpHHEN26+Weuu+PINFffyzzLlpBPQcern0TDqXMJrRJssqX3GV7Mud5fY9qcqKL OTPS5LrmwfWwd8Jq3GdDDrMIPXOE3jf5rVhiyQerJLkFul7C600ivL+WmIUNs52gALvw vVBmzHHLQwBAOqcmTuwOEIW+A9lIJVpLyKtXTdPJiZ5X+0CXVRxe3Vauk3n65J6u9hos 0O+spfnKqbmMqblOigJpNqUW5brIYrDOOuNwVIX/q9jSKdsztQaCdUuiQ6plBp3pjdS+ iTVwMYS4itY8vAVDt4OLRv6ANfk53aQkn1aRjvUPPx6pPbkozGlTeVYQglB/dcaa/rVX a2Uw== X-Gm-Message-State: AN3rC/5RAjjiT2rubjtwJRwwmxBqEHapVGFsEKdSaoS0KKJ5sX4h4hZu 4+3iDv9sHVTQSlN816jL1rMBIC48qg== X-Received: by 10.176.25.15 with SMTP id v15mr7761787uag.81.1493642920819; Mon, 01 May 2017 05:48:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.82.75 with HTTP; Mon, 1 May 2017 05:48:20 -0700 (PDT) In-Reply-To: References: From: Jim Meyering Date: Mon, 1 May 2017 21:48:20 +0900 X-Google-Sender-Auth: iKheKZGXO7iXl5jfq5q0i-s65qQ Message-ID: Content-Type: text/plain; charset=UTF-8 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 May 2017 12:49:06 -0000 On Mon, May 1, 2017 at 3:38 PM, ziyunfei <446240525@qq.com> wrote: > I have the same need as http://stackoverflow.com/questions/14631794/check-if-file-contains-some-text-not-regex-in-unix#comment20438757_14631832. > > $ cat file > foo > bar > > $ echo "$fixed_string" > bar > foo > > $ grep -Fzq "$fixed_string" file && echo "Matched" || echo "Not matched" > Matched # false positive, -z doesn't apply to -F > > > $ [[ "$(cat file)" = *"$fixed_string"* ]] && echo "Matched" || echo "not matched" > not matched # my workaround Consider using perl, i.e., this matches: $ pat='foo bar' $ printf '%s\n' foo bar | perl -0 -ne 'm!\Q'"$pat"'\E! or die' This does not match: $ printf '%s\n' bar foo | perl -0 -ne 'm!\Q'"$pat"'\E! or die' Died at -e line 1, <> chunk 1. From MAILER-DAEMON Mon May 08 11:30:09 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d7kbx-0005NF-1K for mharc-bug-grep@gnu.org; Mon, 08 May 2017 11:30:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7kbu-0005Lh-Ta for bug-grep@gnu.org; Mon, 08 May 2017 11:30:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7kbr-0005XS-KX for bug-grep@gnu.org; Mon, 08 May 2017 11:30:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36370) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7kbr-0005Wx-H9 for bug-grep@gnu.org; Mon, 08 May 2017 11:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d7kbr-00013a-6l for bug-grep@gnu.org; Mon, 08 May 2017 11:30:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26832: bug on grep 3.0 Resent-From: =?UTF-8?Q?=E5=B7=9D=E5=B4=8E_?= =?UTF-8?Q?=E6=AD=A3=E8=B2=B4?= Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 08 May 2017 15:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26832 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 26832@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14942573854012 (code B ref -1); Mon, 08 May 2017 15:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 May 2017 15:29:45 +0000 Received: from localhost ([127.0.0.1]:34569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kbZ-00012d-BX for submit@debbugs.gnu.org; Mon, 08 May 2017 11:29:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7dXJ-0003H8-S2 for submit@debbugs.gnu.org; Mon, 08 May 2017 03:56:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7dXD-0001rD-UD for submit@debbugs.gnu.org; Mon, 08 May 2017 03:56:48 -0400 Received: from lists.gnu.org ([2001:4830:134:3::11]:45730) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7dXD-0001r7-RY for submit@debbugs.gnu.org; Mon, 08 May 2017 03:56:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7dXC-000080-UG for bug-grep@gnu.org; Mon, 08 May 2017 03:56:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7dX9-0001ow-RG for bug-grep@gnu.org; Mon, 08 May 2017 03:56:46 -0400 Received: from ktmail7.koeitecmo.co.jp ([124.38.61.244]:47992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7dX9-0001oL-GU for bug-grep@gnu.org; Mon, 08 May 2017 03:56:43 -0400 X-AuditID: c0a80a04-f790c6d00000142b-08-591024b27d9a Received: from mailjn.koeitecmo.co.jp ( [10.220.0.221]) by ktmail7.koeitecmo.co.jp (ktmail7.koeitecmo.co.jp) with SMTP id 2D.EA.05163.2B420195; Mon, 8 May 2017 16:56:34 +0900 (JST) Received: (from root@localhost) by mailjn.koeitecmo.co.jp (8.13.8/8.13.8) id v487uXfS013406 for bug-grep@gnu.org; Mon, 8 May 2017 16:56:33 +0900 Received: (qmail 31406 invoked from network); 8 May 2017 16:56:31 +0900 Received: from unknown (HELO ?127.0.0.1?) (10.240.45.20) by kemailsv.ax.koei.co.jp with SMTP; 8 May 2017 16:56:31 +0900 From: =?UTF-8?Q?=E5=B7=9D=E5=B4=8E_?= =?UTF-8?Q?=E6=AD=A3=E8=B2=B4?= Organization: koeitecmo Message-ID: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> Date: Mon, 8 May 2017 16:56:31 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLIsWRmVeSWpSXmKPExsXCdYfhru4mFYFIg88d2hY3XvSwOjB6tE0z C2CM4rJJSc3JLEst0rdL4MqY9OsLe8FFpop1N94xNjC2M3UxcnJICJhI/J6wiRXCFpO4cG89 G4gtJLCdUeL+nOouRi4gewqjxKeeGYxdjBxAjrvE8XkmEDVVEl87J4L1sgl4Sby7ehXMFhaQ kDixbQIziC0iICLRd/8WO4jNLyAu8eTGU7AaXgEnibe3F4LdwCKgIvFmeyeYLSoQK/F9Xxs7 RI2gxMmZT1hAbGYBXYmHDxpZIWx5ie1v5zBPYBSYhaRsFpKyWUjKFjAyr2IUzy7JTczMMdfL zk/NLElNzs3XS87XyyrYxAgMwQMruFh2ME6f43KIUYCDUYmHd0cpf6QQa2JZcWXuIUZJDiYl Ud4oBoFIIb6k/JTKjMTijPii0pzU4kOMEhzMSiK8C0WBcrwpiZVVqUX5MClpDhYlcV7vrkmh QgLpiSWp2ampBalFMFkZDg4lCV4FZaBGwaLU9NSKtMycEoQ0EwcnyHAeoOEeIDW8xQWJucWZ 6RD5U4yqHHPufX3PJMSSl5+XKiXOKwpSJABSlFGaBzfnFaM40DvCvP4gWR5gmoGb8ApoOBPQ 8EAGsOEliQgpqQbGeiORXTba2Z9d2DlU/euPCvyYXBXPpq3IFaxwZ8sm/qeXCyQa/onNML8g diy5/Fb3Pvam709Z/K4uuThtwiVm+f6Q5o4e5X0fA1d0blU86ez4JzXt2de+lTtte7knxiWy Ma8O/ZLHaNjDGyg657fC519H7fb/PR9mLPVq380TQVN3f+/zb/+nxFKckWioxVxUnAgA/1Tx IfACAAA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Mon, 08 May 2017 11:29:43 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 15:30:07 -0000 I found a bug on grep 3.0 on 64bit cygwin. It seems that '\/' before '$' causes probrems. grep 2.25(correct) >echo rr/| grep '^.*\/$' rr/ >echo rr/| gawk '/^.*\/$/' rr/ >echo rr/| sed -ne '/^.*\/$/p' rr/ grep 3.0(incorrect) >echo rr/| grep '^.*\/$' >echo rr/| gawk '/^.*\/$/' >echo rr/| sed -ne '/^.*\/$/p' thanks. From MAILER-DAEMON Mon May 08 19:20:08 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d7rwm-0001Rt-3u for mharc-bug-grep@gnu.org; Mon, 08 May 2017 19:20:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7rwj-0001QF-M1 for bug-grep@gnu.org; Mon, 08 May 2017 19:20:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7rwg-0003tQ-H7 for bug-grep@gnu.org; Mon, 08 May 2017 19:20:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57715) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7rwg-0003tI-EN for bug-grep@gnu.org; Mon, 08 May 2017 19:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d7rwg-0003SC-5x for bug-grep@gnu.org; Mon, 08 May 2017 19:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26832: bug on grep 3.0 Resent-From: Norihiro Tanaka Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 08 May 2017 23:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26832 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Cc: 26832@debbugs.gnu.org Received: via spool by 26832-submit@debbugs.gnu.org id=B26832.149428556913234 (code B ref 26832); Mon, 08 May 2017 23:20:02 +0000 Received: (at 26832) by debbugs.gnu.org; 8 May 2017 23:19:29 +0000 Received: from localhost ([127.0.0.1]:60392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7rw9-0003RN-Hw for submit@debbugs.gnu.org; Mon, 08 May 2017 19:19:29 -0400 Received: from mailgw05.kcn.ne.jp ([61.86.7.212]:53299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7rw7-0003RA-Dn for 26832@debbugs.gnu.org; Mon, 08 May 2017 19:19:28 -0400 Received: from mxs01-s (mailgw1.kcn.ne.jp [61.86.15.233]) by mailgw05.kcn.ne.jp (Postfix) with ESMTP id 5FB178806B2 for <26832@debbugs.gnu.org>; Tue, 9 May 2017 08:19:20 +0900 (JST) X-matriXscan-loop-detect: 41196f3441ce53d3dbaaca79234ded66fc4a51da Received: from mail08.kcn.ne.jp ([61.86.6.187]) by mxs01-s with ESMTP; Tue, 09 May 2017 08:19:19 +0900 (JST) Received: from [10.120.1.69] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) by mail08.kcn.ne.jp (Postfix) with ESMTPA id 1FD7D12B809A; Tue, 9 May 2017 08:19:19 +0900 (JST) Date: Tue, 09 May 2017 08:19:18 +0900 From: Norihiro Tanaka In-Reply-To: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> Message-Id: <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.73 [ja] X-matriXscan-Sophos-AV: Clean X-matriXscan-Action: Approve X-matriXscan: Uncategorized X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 23:20:06 -0000 On Mon, 8 May 2017 16:56:31 +0900 Masataka Kawasaki wrote: > I found a bug on grep 3.0 on 64bit cygwin. > It seems that '\/' before '$' causes probrems. > > grep 2.25(correct) > >echo rr/| grep '^.*\/$' > rr/ > >echo rr/| gawk '/^.*\/$/' > rr/ > >echo rr/| sed -ne '/^.*\/$/p' > rr/ > > grep 3.0(incorrect) > >echo rr/| grep '^.*\/$' > >echo rr/| gawk '/^.*\/$/' > >echo rr/| sed -ne '/^.*\/$/p' > > thanks. Hi, $ env LC_ALL=C src/grep --version grep (GNU grep) 3.0 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and others, see . $ echo rr/ | env LC_ALL=C src/grep '^.*\/$' rr/ $ echo rr/ | env LC_ALL=ja_JP.utf8 src/grep '^.*\/$' rr/ $ echo rr/ | env LC_ALL=ja_JP.eucjp src/grep '^.*\/$' rr/ I think that it is not a bug. Thanks, Norihiro From MAILER-DAEMON Mon May 08 19:47:07 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d7sMt-00039l-HX for mharc-bug-grep@gnu.org; Mon, 08 May 2017 19:47:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7sMr-00037N-46 for bug-grep@gnu.org; Mon, 08 May 2017 19:47:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7sMo-00054E-1b for bug-grep@gnu.org; Mon, 08 May 2017 19:47:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57729) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7sMn-000547-U4 for bug-grep@gnu.org; Mon, 08 May 2017 19:47:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d7sMn-00044s-Li for bug-grep@gnu.org; Mon, 08 May 2017 19:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26832: bug on grep 3.0 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 08 May 2017 23:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26832 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: =?UTF-8?Q?=E5=B7=9D=E5=B4=8E_?= =?UTF-8?Q?=E6=AD=A3=E8=B2=B4?= Cc: 26832@debbugs.gnu.org, Norihiro Tanaka Received: via spool by 26832-submit@debbugs.gnu.org id=B26832.149428721015653 (code B ref 26832); Mon, 08 May 2017 23:47:01 +0000 Received: (at 26832) by debbugs.gnu.org; 8 May 2017 23:46:50 +0000 Received: from localhost ([127.0.0.1]:60406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7sMc-00044P-2U for submit@debbugs.gnu.org; Mon, 08 May 2017 19:46:50 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7sMZ-00044B-PD for 26832@debbugs.gnu.org; Mon, 08 May 2017 19:46:48 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C39DA160051; Mon, 8 May 2017 16:46:41 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id dt_37NlAKFuX; Mon, 8 May 2017 16:46:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BBC7E16006E; Mon, 8 May 2017 16:46:40 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UFoJZt3z5ptj; Mon, 8 May 2017 16:46:40 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 55F58160051; Mon, 8 May 2017 16:46:40 -0700 (PDT) References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> Date: Mon, 8 May 2017 16:46:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 23:47:06 -0000 This bug has the feel of Bug#25707, which was fixed as described in: http://bugs.gnu.org/25707 Can you try a grep with that fix? Here's one way to build and test grep with the fix, assuming you have sufficient developer tools installed: git clone https://git.savannah.gnu.org/git/grep.git cd grep ./bootstrap ./configure make echo rr/| src/grep '^.*\/$' From MAILER-DAEMON Wed May 10 04:29:09 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d8Mzd-0008JX-0F for mharc-bug-grep@gnu.org; Wed, 10 May 2017 04:29:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8Mza-0008Hy-1o for bug-grep@gnu.org; Wed, 10 May 2017 04:29:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8MzW-00028o-TM for bug-grep@gnu.org; Wed, 10 May 2017 04:29:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60601) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8MzW-00028g-QN for bug-grep@gnu.org; Wed, 10 May 2017 04:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8MzW-0007j5-Gy for bug-grep@gnu.org; Wed, 10 May 2017 04:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26832: bug on grep 3.0 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 10 May 2017 08:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26832 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: =?UTF-8?Q?=E5=B7=9D=E5=B4=8E_?= =?UTF-8?Q?=E6=AD=A3=E8=B2=B4?= Cc: 26832@debbugs.gnu.org, Norihiro Tanaka Received: via spool by 26832-submit@debbugs.gnu.org id=B26832.149440490429650 (code B ref 26832); Wed, 10 May 2017 08:29:02 +0000 Received: (at 26832) by debbugs.gnu.org; 10 May 2017 08:28:24 +0000 Received: from localhost ([127.0.0.1]:35045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8Myu-0007iA-6e for submit@debbugs.gnu.org; Wed, 10 May 2017 04:28:24 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8Mys-0007hv-4p for 26832@debbugs.gnu.org; Wed, 10 May 2017 04:28:22 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 46975160076; Wed, 10 May 2017 01:28:16 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id B1MAf-J1wyaq; Wed, 10 May 2017 01:28:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E3B6E160083; Wed, 10 May 2017 01:28:14 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NFjskt7uoYMR; Wed, 10 May 2017 01:28:14 -0700 (PDT) Received: from [192.168.1.9] (unknown [47.153.188.248]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C460F160076; Wed, 10 May 2017 01:28:14 -0700 (PDT) References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> <0b4f61a9-8a2a-d218-70de-616485cc00ef@koeitecmo.co.jp> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <0f5c1751-0075-f90f-8562-8f7a6087110a@cs.ucla.edu> Date: Wed, 10 May 2017 01:28:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <0b4f61a9-8a2a-d218-70de-616485cc00ef@koeitecmo.co.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 08:29:07 -0000 =E5=B7=9D=E5=B4=8E =E6=AD=A3=E8=B2=B4 wrote: > bootstrap modified shebang '#!/bin/sh -x' outputs: > -- > + git submodule update -- gnulib > Cloning into '/home/username/grep/gnulib'... > fatal: repository 'https://git.sv.gnu.org/gnulib.git/' not found I'm afraid I don't know offhand what sort of problem would cause this. (P= erhaps=20 it's the same problem that is affecting grep.) I don't observe it on my=20 GNU/Linux host. Perhaps you can try the recipe on a non-MS-Windows host; = if it=20 works there, you can do a 'make dist' to generate a tarball, and then ext= ract=20 the tarball under MS-Windows and build it there. From MAILER-DAEMON Wed May 10 11:31:08 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d8Ta0-0000PL-8U for mharc-bug-grep@gnu.org; Wed, 10 May 2017 11:31:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8TZy-0000PE-9G for bug-grep@gnu.org; Wed, 10 May 2017 11:31:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8TZw-00045j-Fs for bug-grep@gnu.org; Wed, 10 May 2017 11:31:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34223) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8TZv-00045b-Cj for bug-grep@gnu.org; Wed, 10 May 2017 11:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8TZu-0004Ur-JV for bug-grep@gnu.org; Wed, 10 May 2017 11:31:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26864: Clarification on obscure regular expressions mentioned in known bugs Resent-From: Sundeep Agarwal Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 10 May 2017 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26864 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 26864@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.149443024617258 (code B ref -1); Wed, 10 May 2017 15:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 May 2017 15:30:46 +0000 Received: from localhost ([127.0.0.1]:36898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8TZd-0004UH-Ku for submit@debbugs.gnu.org; Wed, 10 May 2017 11:30:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8NIe-0008Bh-Gp for submit@debbugs.gnu.org; Wed, 10 May 2017 04:48:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8NIX-0000yo-SO for submit@debbugs.gnu.org; Wed, 10 May 2017 04:48:43 -0400 Received: from lists.gnu.org ([2001:4830:134:3::11]:48355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d8NIX-0000yk-Ph for submit@debbugs.gnu.org; Wed, 10 May 2017 04:48:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8NIW-0000fS-9e for bug-grep@gnu.org; Wed, 10 May 2017 04:48:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8NIU-0000xh-Uk for bug-grep@gnu.org; Wed, 10 May 2017 04:48:40 -0400 Received: from mail-io0-x236.google.com ([2607:f8b0:4001:c06::236]:34900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8NIU-0000xM-OD for bug-grep@gnu.org; Wed, 10 May 2017 04:48:38 -0400 Received: by mail-io0-x236.google.com with SMTP id f102so9032854ioi.2 for ; Wed, 10 May 2017 01:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=g8rFM6AJFsFrND1KqT3vfY9hVySitjYb7SOXrO8QIMw=; b=edzuTLexr3/Sya9BujBdOH3uB+7fnHJgBMDvUlVWLUrwKEBIZK0EPdDlzApI7I1xdu FipFOtKG/HzXJBH6FVQvwYuf3vYUaTgPZnSMcRFJsKVPVkPdDOpihp0apbTQ8sJDzWod /MpP52LUFaE23AAIREthtPXdhO2nBZTDGVpDYSQ6eG9e0g4ye2QeKoc7c6uVFVEOIsg5 v980gIrqGgtirz3H/5QM1yRPgMA9DcnNI4M9dqvlV8LYSW0gxW+wu841ERiSln4+G/6v O15Vf0eIIht1Zhzu/9nysZyJS5QFLLfB2svPbpkRab27HeQ/OpWdxtUpYmZ4CvltxUne aSmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=g8rFM6AJFsFrND1KqT3vfY9hVySitjYb7SOXrO8QIMw=; b=FhBqfj9LKsJWVbt0YOSDcAyRSu8hxyTlcwaxS97vfW9uWZZygOGk6kmdvBWjmYPjGg d/kczJyWfgNMfZGoKmYPNyc9IvFZVMyiTmUj1T/HaVe3BlnHWpdO+r4IU5P1MqOUAViI 440JdKt1NwGa9SiFIPOqNyEtlwvdJowzahK6Jt2+twKgjoP9Mev9pC7PCIAbZ2SkqeVA u9PEtoJP00n34CbQen6gqjEUF5zO9kxPpm10Zl8WjYBZNYyp8ofjYRGM+4bT3bVKB3jL +HFhwtsdb/CvjNJYB/UHBKHCKJs+2BHuNvxnUE6qghwZyXaaK7GXHznP3iBD8FBQnG7p EuGg== X-Gm-Message-State: AODbwcANAwM3CpvwWbD5Nptu0hWQcXHXdMNXoliC8HLJq8b6lwYg3aEW ZKPgIAmsfg/kPXwKrrBxxEjF5En+IapK X-Received: by 10.107.10.223 with SMTP id 92mr2677407iok.108.1494406117424; Wed, 10 May 2017 01:48:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.140.205 with HTTP; Wed, 10 May 2017 01:48:37 -0700 (PDT) From: Sundeep Agarwal Date: Wed, 10 May 2017 14:18:37 +0530 Message-ID: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Wed, 10 May 2017 11:30:44 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:31:07 -0000 Hello, >From the man page, version 'grep (GNU grep) 2.25' -------------------------------- Known Bugs Large repetition counts in the {n,m} construct may cause grep to use lots of memory. In addition, certain other obscure regular expressions require exponential time and space, and may cause grep to run out of memory. Back-references are very slow, and may require exponential time. -------------------------------- I was trying a regular expression to find words from dictionary that have two different instances of repeated letters, for example the words: misspellings, chilliness, woodcutter etc $ # gives no output $ grep -m5 -xiE '([a-z]*([a-z])\2[a-z]*){2}' /usr/share/dict/words $ # works as expected with PCRE $ grep -m5 -xiP '([a-z]*([a-z])\2[a-z]*){2}' /usr/share/dict/words Abbott Annabelle Annette Appaloosa Appleseed I asked regarding this on https://stackoverflow.com/questions/43572924/ere-adding-quantifier-to-group-with-inner-group-and-back-reference and other forums. It helped to identify some more cases like $ echo 'aazbbycc' | grep -E '(([a-z])\2[a-z]*){2}' aazbbycc $ # no output $ echo 'aazbbycc' | grep -E '(([a-z])\2[a-z]*){3}' and $ echo 'aazbbycc' | grep -E '(([a-z])\2[a-z]{0,3}){3}' aazbbycc $ # no output $ echo 'aazbbycc' | grep -E '(([a-z])\2[a-z]{0,4}){3}' $ # seems dependent on character class clashing with back reference characters and quantifier count $ # a, b and c are the characters matching back reference $ echo 'aazbbycc' | grep -E '(([a-z])\2[abcyz]{0,4}){2}' aazbbycc $ echo 'aazbbycc' | grep -E '(([a-z])\2[abcyz]{0,4}){3}' $ echo 'aazbbycc' | grep -E '(([a-z])\2[abyz]{0,4}){3}' $ echo 'aazbbycc' | grep -E '(([a-z])\2[byz]{0,4}){3}' $ echo 'aazbbycc' | grep -E '(([a-z])\2[acyz]{0,4}){3}' aazbbycc $ echo 'aazbbycc' | grep -E '(([a-z])\2[ayz]{0,4}){3}' aazbbycc $ echo 'aazbbycc' | grep -E '(([a-z])\2[cyz]{0,4}){3}' aazbbycc $ echo 'aazbbycc' | grep -E '(([a-z])\2[yz]{0,4}){3}' aazbbycc The same behavior is seen with 'sed (GNU sed) 4.2.2' as well. For ex: $ echo 'aazbbycc' | sed -nE '/(([a-z])\2[a-z]{0,3}){3}/p' aazbbycc $ # no output $ echo 'aazbbycc' | sed -nE '/(([a-z])\2[a-z]{0,4}){3}/p' So, my question is whether these regular expression examples come under 'obscure regular expressions' mentioned in the man page. If so, I feel there should be an error message displayed instead of no output Regards, Sundeep From MAILER-DAEMON Wed May 10 11:32:09 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d8Taz-0000Vh-SJ for mharc-bug-grep@gnu.org; Wed, 10 May 2017 11:32:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8Tay-0000VP-06 for bug-grep@gnu.org; Wed, 10 May 2017 11:32:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8Tas-0004Ey-Ee for bug-grep@gnu.org; Wed, 10 May 2017 11:32:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34225) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8Tas-0004Eu-Bq for bug-grep@gnu.org; Wed, 10 May 2017 11:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8Tas-0004Wc-78 for bug-grep@gnu.org; Wed, 10 May 2017 11:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26832: bug on grep 3.0 Resent-From: =?UTF-8?Q?=E5=B7=9D=E5=B4=8E_?= =?UTF-8?Q?=E6=AD=A3=E8=B2=B4?= Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 10 May 2017 15:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26832 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Paul Eggert Cc: 26832@debbugs.gnu.org, Norihiro Tanaka Received: via spool by 26832-submit@debbugs.gnu.org id=B26832.149443026317316 (code B ref 26832); Wed, 10 May 2017 15:32:02 +0000 Received: (at 26832) by debbugs.gnu.org; 10 May 2017 15:31:03 +0000 Received: from localhost ([127.0.0.1]:36900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8TZv-0004Uu-5c for submit@debbugs.gnu.org; Wed, 10 May 2017 11:31:03 -0400 Received: from ktmail7.koeitecmo.co.jp ([124.38.61.244]:51404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8MZq-00077T-Ld for 26832@debbugs.gnu.org; Wed, 10 May 2017 04:02:31 -0400 X-AuditID: c0a80a04-f790c6d00000142b-8d-5912c91263e6 Received: from mailjn.koeitecmo.co.jp ( [10.220.0.221]) by ktmail7.koeitecmo.co.jp (ktmail7.koeitecmo.co.jp) with SMTP id CD.B6.05163.219C2195; Wed, 10 May 2017 17:02:26 +0900 (JST) Received: (from root@localhost) by mailjn.koeitecmo.co.jp (8.13.8/8.13.8) id v4A82P7V029474 for 26832@debbugs.gnu.org; Wed, 10 May 2017 17:02:25 +0900 Received: (qmail 24816 invoked from network); 10 May 2017 17:02:25 +0900 Received: from unknown (HELO ?127.0.0.1?) (10.240.45.20) by kemailsv.ax.koei.co.jp with SMTP; 10 May 2017 17:02:25 +0900 References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> From: =?UTF-8?Q?=E5=B7=9D=E5=B4=8E_?= =?UTF-8?Q?=E6=AD=A3=E8=B2=B4?= Organization: koeitecmo Message-ID: <0b4f61a9-8a2a-d218-70de-616485cc00ef@koeitecmo.co.jp> Date: Wed, 10 May 2017 17:02:25 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42LhusNwV1fopFCkQdsjMYtPByYxOTB6XJy0 jzmAMYrLJiU1J7MstUjfLoEr4/bqL6wFrzkqlp+bx9jAOIO9i5GTQ0LARKLx7RpWCFtM4sK9 9WxdjFwcQgLbGSWObtnPBOHMYpRo//IfKMMB5HhIvJ3pC9IgJFAt8WnvNCYQW1hAXeLF1g+M ILaIgIrEwSdvWCF6FzFKfD3ZBFbELGAnMePHG2YQm03AS+Ld1atgm/kFxCWe3HgKZvMKOEm0 bdoOdh2LgKpE5+mJLCC2qECsxPd9bewQNYISJ2c+AYtzCthLnHx9jQVivrrEn3mXmCFseYnt b+cwT2AUnoWkZRaSsllIyhYwMq9iFM8uyU3MzDHXy85PzSxJTc7N10vO18sq2MQIDOgDK7hY djBOn+NyiFGAg1GJhzdgr2CkEGtiWXFl7iFGSQ4mJVFe3V1CkUJ8SfkplRmJxRnxRaU5qcWH GCU4mJVEeMv3A+V4UxIrq1KL8mFS0hwsSuK83l2TQoUE0hNLUrNTUwtSi2CyMhwcShK8BSeA GgWLUtNTK9Iyc0oQ0kwcnCDDeYCGV4LU8BYXJOYWZ6ZD5E8xqnLsa/34nkmIJS8/L1VKnJfl OFCRAEhRRmke3JxXjOJA7wjzFoKM4AEmLbgJr4CGMwEND2QQABlekoiQkmpgdFV+3eC4NOFA w/9p7l4Lnu9fZpF/2TnGdWq2hfLZL2VzIjNcZOf80L1U0tYaLfmr03LC90PmEpabmjKqf7zm ybtit+ef1H4N111lDlu37vbIfZ5w/6S1cOr+7xXsDnMZN5yyUbmgX9W/kv1OwcJ5Z56p9JSq N19bPu1rsqLzB69lb4xWh3exKrEUZyQaajEXFScCAB5O8nYXAwAA X-Mailman-Approved-At: Wed, 10 May 2017 11:31:01 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:32:09 -0000 On 2017/05/09 8:46, Paul Eggert wrote: > This bug has the feel of Bug#25707, which was fixed as described in: > > http://bugs.gnu.org/25707 > > Can you try a grep with that fix? Here's one way to build and test grep > with the fix, assuming you have sufficient developer tools installed: > > git clone https://git.savannah.gnu.org/git/grep.git > cd grep > ./bootstrap > ./configure > make > echo rr/| src/grep '^.*\/$' bootstrap failed. bootstrap modified shebang '#!/bin/sh -x' outputs: -- + git submodule update -- gnulib Cloning into '/home/username/grep/gnulib'... fatal: repository 'https://git.sv.gnu.org/gnulib.git/' not found -- Accessing to the url by web browser,it is redirected 'https://git.savannah.gnu.org/gnulib.git/' and displays 404 page. BTW, I realized follows. Incorrect outputs of grep are output only on command prompt of Windows. Correct results are output on console of cygwin. Both grep path are /usr/bin/grep and the version is Cygwin (3.0-2). If use 'sh -c' on command prompt of Windows, I can get correct output. >sh -c "echo rr/| grep '^.*\/$'" rr/ thanks. From MAILER-DAEMON Wed May 10 13:40:11 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d8Vat-00086y-5X for mharc-bug-grep@gnu.org; Wed, 10 May 2017 13:40:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8Vaq-00083J-KJ for bug-grep@gnu.org; Wed, 10 May 2017 13:40:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8Vam-00018S-38 for bug-grep@gnu.org; Wed, 10 May 2017 13:40:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34328) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8Vam-00018J-0Y for bug-grep@gnu.org; Wed, 10 May 2017 13:40:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8Val-0007pt-QF for bug-grep@gnu.org; Wed, 10 May 2017 13:40:03 -0400 Subject: bug#26832: bug on grep 3.0 Resent-From: Eric Blake Original-Sender: "Debbugs-submit" Resent-To: bug-grep@gnu.org Resent-Date: Wed, 10 May 2017 17:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 26832 X-GNU-PR-Package: grep X-GNU-PR-Keywords: notabug To: =?UTF-8?Q?=E5=B7=9D=E5=B4=8E_?= =?UTF-8?Q?=E6=AD=A3=E8=B2=B4?= , Paul Eggert Cc: 26832-done@debbugs.gnu.org Mail-Followup-To: 26832@debbugs.gnu.org, eblake@redhat.com, masataka-kawasaki@koeitecmo.co.jp Received: via spool by 26832-done@debbugs.gnu.org id=D26832.149443794830038 (code D ref 26832); Wed, 10 May 2017 17:40:03 +0000 Received: (at 26832-done) by debbugs.gnu.org; 10 May 2017 17:39:08 +0000 Received: from localhost ([127.0.0.1]:36999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8VZs-0007oP-Jp for submit@debbugs.gnu.org; Wed, 10 May 2017 13:39:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8VZq-0007nq-JK; Wed, 10 May 2017 13:39:07 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2334261D38; Wed, 10 May 2017 17:39:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2334261D38 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2334261D38 Received: from [10.10.121.252] (ovpn-121-252.rdu2.redhat.com [10.10.121.252]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DF815DD62; Wed, 10 May 2017 17:38:59 +0000 (UTC) References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> <0b4f61a9-8a2a-d218-70de-616485cc00ef@koeitecmo.co.jp> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <0b8a4bdd-7087-4327-0573-e0923d676383@redhat.com> Date: Wed, 10 May 2017 12:38:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <0b4f61a9-8a2a-d218-70de-616485cc00ef@koeitecmo.co.jp> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SCUpCHiCAlohvWGi6qrLmPqDjLgOLI1Bc" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 10 May 2017 17:39:00 +0000 (UTC) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 17:40:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SCUpCHiCAlohvWGi6qrLmPqDjLgOLI1Bc From: Eric Blake To: =?UTF-8?B?5bed5bSOIOato+iytA==?= , Paul Eggert Cc: 26832-done@debbugs.gnu.org Message-ID: <0b8a4bdd-7087-4327-0573-e0923d676383@redhat.com> Subject: Re: bug#26832: bug on grep 3.0 References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> <0b4f61a9-8a2a-d218-70de-616485cc00ef@koeitecmo.co.jp> In-Reply-To: <0b4f61a9-8a2a-d218-70de-616485cc00ef@koeitecmo.co.jp> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tag 26832 notabug thanks On 05/10/2017 03:02 AM, =E5=B7=9D=E5=B4=8E =E6=AD=A3=E8=B2=B4 wrote: >=20 > BTW, I realized follows. > Incorrect outputs of grep are output only on command prompt of Windows.= > Correct results are output on console of cygwin. Then this is an issue in how cygwin programs handle their arguments when invoked from a native windows program, and/or a factor of the (weird) quoting rules in use by the Windows native command shell (which are NOT AT ALL like normal POSIX shell quoting rules), and nothing to do with upstream grep. You'll probably have better results posting your question on the cygwin mailing list. As such, I'm taking the liberty to close this in the upstream database, as there's nothing we can do here to change behavior. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --SCUpCHiCAlohvWGi6qrLmPqDjLgOLI1Bc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJZE1AyAAoJEKeha0olJ0NqGLIIAIdSH0z/vd8GhNiZf/PA61qa QmtiFD5Nc4NfS3kOtQMr0Mk1ceRdys6lDpN6cmqXqLrf+Nm6vSjco3/ylPFMnpRm U6W+Ni+LIbYVeOBNVckOpISmaPSk4easLqC282b7rAChvbvr/FiZgMum1Zwqmi6v L85YueE2e582alTBEOaC3TuyW9zZqVO6bujxdUjYVSGAOYnpW2kzYg84fEGFf1GV mZAq1ILs9XVBOBTuJnwAz7Km9Rfcy5m9aeGR1EC2xVufPLeof4f2u3OUBkbRYLcP 8vXMre1wkzZr8pzawnta7aAbwL9jEGUcniKbRVcfg+Fni1cWAHaeTorNL9wx9c8= =k3Ua -----END PGP SIGNATURE----- --SCUpCHiCAlohvWGi6qrLmPqDjLgOLI1Bc-- From MAILER-DAEMON Thu May 11 14:08:07 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d8sVT-0005ok-4H for mharc-bug-grep@gnu.org; Thu, 11 May 2017 14:08:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8sVR-0005oc-20 for bug-grep@gnu.org; Thu, 11 May 2017 14:08:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8sVN-0004kV-TV for bug-grep@gnu.org; Thu, 11 May 2017 14:08:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36357) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8sVN-0004kQ-P1 for bug-grep@gnu.org; Thu, 11 May 2017 14:08:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8sVN-0002cm-KM for bug-grep@gnu.org; Thu, 11 May 2017 14:08:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26832: bug on grep 3.0 Resent-From: Eric Blake Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Thu, 11 May 2017 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26832 X-GNU-PR-Package: grep X-GNU-PR-Keywords: notabug To: 26832@debbugs.gnu.org, masataka-kawasaki@koeitecmo.co.jp Received: via spool by 26832-submit@debbugs.gnu.org id=B26832.149452603010032 (code B ref 26832); Thu, 11 May 2017 18:08:01 +0000 Received: (at 26832) by debbugs.gnu.org; 11 May 2017 18:07:10 +0000 Received: from localhost ([127.0.0.1]:39034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8sUW-0002bg-SM for submit@debbugs.gnu.org; Thu, 11 May 2017 14:07:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8sUU-0002b4-8R for 26832@debbugs.gnu.org; Thu, 11 May 2017 14:07:06 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 737F4448D6F; Thu, 11 May 2017 18:07:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 737F4448D6F Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 737F4448D6F Received: from [10.10.125.65] (ovpn-125-65.rdu2.redhat.com [10.10.125.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3DD860F85; Thu, 11 May 2017 18:06:59 +0000 (UTC) References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> <0b4f61a9-8a2a-d218-70de-616485cc00ef@koeitecmo.co.jp> <0b8a4bdd-7087-4327-0573-e0923d676383@redhat.com> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: Date: Thu, 11 May 2017 13:06:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <0b8a4bdd-7087-4327-0573-e0923d676383@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qr0WakqwlXWd5B4NbqcQqFW63V4TXFwdh" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 11 May 2017 18:07:00 +0000 (UTC) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 18:08:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qr0WakqwlXWd5B4NbqcQqFW63V4TXFwdh From: Eric Blake To: 26832@debbugs.gnu.org, masataka-kawasaki@koeitecmo.co.jp Message-ID: Subject: Re: bug#26832: bug on grep 3.0 References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> <0b4f61a9-8a2a-d218-70de-616485cc00ef@koeitecmo.co.jp> <0b8a4bdd-7087-4327-0573-e0923d676383@redhat.com> In-Reply-To: <0b8a4bdd-7087-4327-0573-e0923d676383@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/10/2017 12:38 PM, Eric Blake wrote: >> BTW, I realized follows. >> Incorrect outputs of grep are output only on command prompt of Windows= =2E >> Correct results are output on console of cygwin. >=20 > Then this is an issue in how cygwin programs handle their arguments whe= n > invoked from a native windows program, and/or a factor of the (weird) > quoting rules in use by the Windows native command shell (which are NOT= > AT ALL like normal POSIX shell quoting rules), and nothing to do with > upstream grep. You'll probably have better results posting your questio= n > on the cygwin mailing list. In fact, the cygwin list pointed out that the change was intentional - when you are using the builtin 'echo' of a Windows command prompt, you are feeding CRLF data into grep, but the cygwin build of grep no longer forcefully treats binary files in text mode, which means the pattern "/$" no longer matches on the input string "/\r\n", but only on "/\n". When you use a Cygwin shell, the builtin 'echo' does not produce \r in the first place. https://cygwin.com/ml/cygwin-announce/2017-02/msg00035.html shows that the change was coordinated between grep, sed, and awk; we can't help you if you fail to read release notes from your distribution. The solution is the same as you would do on Linux: preprocess your data to strip out \r (or write patterns that specifically accommodate for \r). Or, for the case where your data resides on the file system, you can use the cygwin-specific approach of making that directory a text mount point rather than the default binary mount point, so that cygwin will strip the \r on your behalf. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --qr0WakqwlXWd5B4NbqcQqFW63V4TXFwdh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJZFKhCAAoJEKeha0olJ0NqUq4H/1gN5hyjoPzE7+cILpKye6Wa vzejUSK2OIpAqBbWTLNx7FAuSwe094T5HPuo+S3bQK4gD6PDLGgp0rvb345nO8LA TE0/LfSb7OgY/8snCiJuX1MdCcemuLHs6fCEmGiKLcasxslff0UPOcbT3o+vNhEW EqkXFRA3iZW8VObOtAsnc5O0I6i/Zdf/4on43a3RXW7Y6tqkiewNy0ujCHfYpyi6 PkNJXqdPUgxZnOudoDbeNyROn0REgh83yx5iZSS+X8w+6qa26rMc1urt4Vqpzqw7 /3JUAPNNRGvXv2z/e2zTHjlYxMHarp6DPiebu95ykH7Ljx4sfjI6vtTcHvyAOFE= =mZDR -----END PGP SIGNATURE----- --qr0WakqwlXWd5B4NbqcQqFW63V4TXFwdh-- From MAILER-DAEMON Thu May 11 14:10:11 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d8sXT-0006ed-P4 for mharc-bug-grep@gnu.org; Thu, 11 May 2017 14:10:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8sXN-0006bg-I2 for bug-grep@gnu.org; Thu, 11 May 2017 14:10:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8sXK-0006DP-Do for bug-grep@gnu.org; Thu, 11 May 2017 14:10:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36361) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8sXK-0006DJ-9c for bug-grep@gnu.org; Thu, 11 May 2017 14:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8sXK-0002fm-5O for bug-grep@gnu.org; Thu, 11 May 2017 14:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26832: bug on grep 3.0 Resent-From: Eric Blake Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Thu, 11 May 2017 18:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26832 X-GNU-PR-Package: grep X-GNU-PR-Keywords: notabug To: Paul Eggert , =?UTF-8?Q?=E5=B7=9D=E5=B4=8E_?= =?UTF-8?Q?=E6=AD=A3=E8=B2=B4?= Cc: 26832@debbugs.gnu.org Received: via spool by 26832-submit@debbugs.gnu.org id=B26832.149452615710217 (code B ref 26832); Thu, 11 May 2017 18:10:02 +0000 Received: (at 26832) by debbugs.gnu.org; 11 May 2017 18:09:17 +0000 Received: from localhost ([127.0.0.1]:39038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8sWa-0002ej-Nl for submit@debbugs.gnu.org; Thu, 11 May 2017 14:09:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8sWZ-0002eW-5C for 26832@debbugs.gnu.org; Thu, 11 May 2017 14:09:15 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4903AC04B95A; Thu, 11 May 2017 18:09:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4903AC04B95A Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4903AC04B95A Received: from [10.10.125.65] (ovpn-125-65.rdu2.redhat.com [10.10.125.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD0BE1756B; Thu, 11 May 2017 18:09:08 +0000 (UTC) References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: Date: Thu, 11 May 2017 13:09:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hDHl7ACNHfQ1D9nmgen689A87v0HaBBXn" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 11 May 2017 18:09:09 +0000 (UTC) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 18:10:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hDHl7ACNHfQ1D9nmgen689A87v0HaBBXn From: Eric Blake To: Paul Eggert , =?UTF-8?B?5bed5bSOIOato+iytA==?= Cc: 26832@debbugs.gnu.org Message-ID: Subject: Re: bug#26832: bug on grep 3.0 References: <6d96ef04-14d4-5a51-0202-55800dd8f461@koeitecmo.co.jp> <20170509081917.8BDD.27F6AC2D@kcn.ne.jp> <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> In-Reply-To: <21d97579-fa11-d354-974f-937081c5aee2@cs.ucla.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/08/2017 06:46 PM, Paul Eggert wrote: > This bug has the feel of Bug#25707, which was fixed as described in: >=20 > http://bugs.gnu.org/25707 In fact, that bug was filed upstream _because_ of cygwin's coordinated move to have grep, sed, and awk no longer mangle binary files. >=20 > Can you try a grep with that fix? Here's one way to build and test grep= > with the fix, assuming you have sufficient developer tools installed: In fact, the pre-built grep shipping in cygwin DOES have that fix already installed. The bug is therefore not in grep, but in usage expectations of an environment feeding \r\n to grep without accounting for the \r no longer being silently ignored. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --hDHl7ACNHfQ1D9nmgen689A87v0HaBBXn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJZFKjEAAoJEKeha0olJ0NqBskIAJ2MQHHlcSQwHDKU/EZCaM21 rIFbZIF6itE88lqRzYsARX3e2cEzABieEEHpleF2x9ufaefQXLDUkQicuePQ9hHo KjR0Vwdsyz95NE+I3r6HKMTQNu+qEokZLUQ6PViLah1pRExjV0miRqy5SMRl7zKJ +sQ3P5xHygWJAf9qwQTNCr65aFSYa93rc+6dNGBkg8cnvOFihbJDqD0D97Zh/CQk tvSQe1exIas2IE5VwA2r8YaDahsPekQd6cPjDyrE2ufYi0vTrcXV0wNdhBxES8Nr 63o1ID2f7NzKkX18T930sAG2CuZrGNZmCCcZ39gBj6ENXCcVRzv7cwwCasB6E9s= =zn9i -----END PGP SIGNATURE----- --hDHl7ACNHfQ1D9nmgen689A87v0HaBBXn-- From MAILER-DAEMON Sat May 13 01:57:07 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d9Q39-0008I9-Rf for mharc-bug-grep@gnu.org; Sat, 13 May 2017 01:57:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9Q37-0008DA-Cj for bug-grep@gnu.org; Sat, 13 May 2017 01:57:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9Q34-0005At-Ba for bug-grep@gnu.org; Sat, 13 May 2017 01:57:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:39001) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9Q34-0005AS-8F for bug-grep@gnu.org; Sat, 13 May 2017 01:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d9Q33-0000pD-RQ for bug-grep@gnu.org; Sat, 13 May 2017 01:57:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26904: Wishlist: Tell grep to stop when a line matches something else. Resent-From: LA-notifications@xecu.net Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sat, 13 May 2017 05:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26904 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 26904@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@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 ) id 1d9Q2K-0000o8-Ng for submit@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 ) id 1d9PKk-0008AD-Ny for submit@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 ) id 1d9PKe-0001dx-QZ for submit@debbugs.gnu.org; Sat, 13 May 2017 01:11:09 -0400 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 ) id 1d9PKe-0001dj-Mk for submit@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 ) id 1d9PKd-0005hR-Lc for bug-grep@gnu.org; Sat, 13 May 2017 01:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9PKX-0001ZO-OI for bug-grep@gnu.org; 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 ) id 1d9PKX-0001VT-J3 for bug-grep@gnu.org; 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 ; 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@xecu.net) by mail2.xecu.net (Postfix) with ESMTPA id 665F6892822 for ; 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@xecu.net Message-ID: X-Sender: LA-notifications@xecu.net 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-Mailman-Approved-At: Sat, 13 May 2017 01:56:15 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 05:57:06 -0000 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 From MAILER-DAEMON Sat May 13 02:37:08 2017 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d9Qfr-0008TA-UR for mharc-bug-grep@gnu.org; Sat, 13 May 2017 02:37:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9Qfq-0008QN-2w for bug-grep@gnu.org; Sat, 13 May 2017 02:37:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9Qfm-0007it-Uj for bug-grep@gnu.org; Sat, 13 May 2017 02:37:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:39023) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9Qfm-0007ig-Qe for bug-grep@gnu.org; Sat, 13 May 2017 02:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d9Qfm-0001iw-AK for bug-grep@gnu.org; Sat, 13 May 2017 02:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#26904: Wishlist: Tell grep to stop when a line matches something else. Resent-From: Shlomi Fish Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sat, 13 May 2017 06:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26904 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: LA-notifications@xecu.net Cc: 26904@debbugs.gnu.org Received: via spool by 26904-submit@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 ) id 1d9Qf3-0001hz-On for submit@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 ) id 1d9Qf1-0001hp-8c for 26904@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@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 ) 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 Message-ID: <20170513093105.31f48ce5@telaviv1.shlomifish.org> In-Reply-To: References: 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@shlomifish.org X-Email-Count: 2 X-Source-Cap: c2hsb21pZjtzaGxvbWlmO2dhdG9yNDA2NS5ob3N0Z2F0b3IuY29t X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-grep@gnu.org List-Id: Bug reports for GNU grep List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 06:37:07 -0000 Hi LA, On Sat, 13 May 2017 01:10:52 -0400 LA-notifications@xecu.net 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 .