From unknown Sun Sep 07 03:08:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18863: grep -b bug Resent-From: =?UTF-8?Q?=E7=8E=8B=E7=90=A6?= Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Tue, 28 Oct 2014 07:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18863 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 18863@debbugs.gnu.org X-Debbugs-Original-To: "bug-grep@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.141448049314929 (code B ref -1); Tue, 28 Oct 2014 07:15:03 +0000 Received: (at submit) by debbugs.gnu.org; 28 Oct 2014 07:14:53 +0000 Received: from localhost ([127.0.0.1]:37134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj0zR-0003sd-DQ for submit@debbugs.gnu.org; Tue, 28 Oct 2014 03:14:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38959) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xif3r-00054l-Qv for submit@debbugs.gnu.org; Mon, 27 Oct 2014 03:49:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xif3c-0002eh-MW for submit@debbugs.gnu.org; Mon, 27 Oct 2014 03:49:50 -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,HTML_MESSAGE, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xif3c-0002ed-K3 for submit@debbugs.gnu.org; Mon, 27 Oct 2014 03:49:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xif3V-0002AX-58 for bug-grep@gnu.org; Mon, 27 Oct 2014 03:49:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xif3N-0002b8-MZ for bug-grep@gnu.org; Mon, 27 Oct 2014 03:49:33 -0400 Received: from m12-14.163.com ([220.181.12.14]:40018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xif3L-0002aN-U0 for bug-grep@gnu.org; Mon, 27 Oct 2014 03:49:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Subject:From:Date:MIME-Version:Message-ID; bh=OI4Cu mifU7GSvfsQ4TFw68sgZClY/ny4JLq5U3vlSSc=; b=ZGaSqwWDC6j1o3vcRTyB1 VXbcUKcYq75kDOf4hKuxUozqF6O5dOf/VT4vqdNlXqquHJsIOrPvSvQqCUs9ogDq In2leOq0hsYFotweEShc7Fmvcq+rORSWCi8hZOPd9kkAbfdBZU7HVjwWr1NWs3P0 TPhkzOJGwVnZ2DgYXomkyk= Received: from android.netease.mail (unknown [124.160.208.42]) by smtp10 (Coremail) with SMTP id DsCowEApCVH5+E1UWOF7Aw--.1289S2; Mon, 27 Oct 2014 15:49:15 +0800 (CST) X-Coremail-DSSMTP: 124.160.208.42 From: =?UTF-8?Q?=E7=8E=8B=E7=90=A6?= Date: Mon, 27 Oct 2014 15:49:12 +0800 MIME-Version: 1.0 X-Priority: 3 Message-ID: <1414396150034.ter2o00kwoim0ak3r5n4v54b@android.mail.163.com> X-Mailer: Netease Android Mail Content-Type: multipart/alternative; boundary="__MESSAGE_BODY_PART__0" X-CM-TRANSID: DsCowEApCVH5+E1UWOF7Aw--.1289S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvj4Ri2-5DUUUU X-Originating-IP: [124.160.208.42] X-CM-SenderInfo: hztbu25looxtlqw6il2tof0z/xtbBoRwyHFQGu7Ff7wAAs7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Mailman-Approved-At: Tue, 28 Oct 2014 03:14:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --__MESSAGE_BODY_PART__0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 SGksIEkgZm91bmQgdGhhdCAiZ3JlcCAtYiIgZG9lc24ndCB3b3JrIG9uIG15IG1hY2hpbmUuIHRo ZSBleHBlY3RlZCByZXN1bHQgZm9yIGJlbG93IGNvbW1hbmQgaXMgIjc6bm90IiwgYnV0IEkgZ290 IDAgJCBlY2hvIGdudSBpcyBub3QgdW5peCB8IGdyZXAgLWIgLW8gIm5vdCIgMDpub3QgQmFzaCB2 ZXJzaW9uIDMuMi4yNSBMaW51eCB2ZXJzaW9uIDIuNi4xOCBUaGFua3MuIOWPkeiHqumCrueuseWk p+W4iA== --__MESSAGE_BODY_PART__0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: base64 PGRpdiBzdHlsZT0nZm9udC1zaXplOjE1cHg7Y29sb3I6IzMzMzMzMztsaW5lLWhlaWdodDoyNHB4 Jz5IaSw8YnIvPkkgZm91bmQgdGhhdCAmcXVvdDtncmVwIC1iJnF1b3Q7IGRvZXNuJ3Qgd29yayBv biBteSBtYWNoaW5lLjxici8+dGhlIGV4cGVjdGVkIHJlc3VsdCBmb3IgYmVsb3cgY29tbWFuZCBp cyAmcXVvdDs3Om5vdCZxdW90OywgYnV0IEkgZ290IDA8YnIvPiQgZWNobyBnbnUgaXMgbm90IHVu aXggfCBncmVwIC1iIC1vICZxdW90O25vdCZxdW90Ozxici8+MDpub3QgPGJyLz5CYXNoIHZlcnNp b24gMy4yLjI1PGJyLz5MaW51eCB2ZXJzaW9uIDIuNi4xODxici8+PGJyLz5UaGFua3MuPGJyLz48 YnIvPuWPkeiHqumCrueuseWkp+W4iDxkaXY+ --__MESSAGE_BODY_PART__0-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 28 08:38:08 2014 Received: (at control) by debbugs.gnu.org; 28 Oct 2014 12:38:08 +0000 Received: from localhost ([127.0.0.1]:37279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj62K-0006E3-4X for submit@debbugs.gnu.org; Tue, 28 Oct 2014 08:38:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33308) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj62G-0006Dq-LM; Tue, 28 Oct 2014 08:38:05 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9SCbxQv031791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Oct 2014 08:37:59 -0400 Received: from [10.3.113.180] (ovpn-113-180.phx2.redhat.com [10.3.113.180]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9SCbwj5002813; Tue, 28 Oct 2014 08:37:58 -0400 Message-ID: <544F8E26.5050207@redhat.com> Date: Tue, 28 Oct 2014 06:37:58 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: =?UTF-8?B?546L55Cm?= , 18863-done@debbugs.gnu.org Subject: Re: bug#18863: grep -b bug References: <1414396150034.ter2o00kwoim0ak3r5n4v54b@android.mail.163.com> In-Reply-To: <1414396150034.ter2o00kwoim0ak3r5n4v54b@android.mail.163.com> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gpsd4QmKKopFtB1p4qmMb3mcTOiP2ssC8" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gpsd4QmKKopFtB1p4qmMb3mcTOiP2ssC8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tag 18863 notabug thanks On 10/27/2014 01:49 AM, =E7=8E=8B=E7=90=A6 wrote: > Hi, I found that "grep -b" doesn't work on my machine. the expected res= ult for below command is "7:not", but I got 0 $ echo gnu is not unix | gr= ep -b -o "not" 0:not Bash version 3.2.25 Linux version 2.6.18 Thanks. =E5= =8F=91=E8=87=AA=E9=82=AE=E7=AE=B1=E5=A4=A7=E5=B8=88 [your report was hard to read because you failed to use line wrapping] Thanks for the report. However, I cannot reproduce it on newer grep, and have to assume the error has either been fixed in the meantime. Therefore, I'm closing out this bug report, although you should feel free to make further comments or even reopen this if you can demonstrate that a problem still exists. $ grep --version | head -n1 grep (GNU grep) 2.18 $ echo gnu is not unix | grep -b -o not 7:not --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --gpsd4QmKKopFtB1p4qmMb3mcTOiP2ssC8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUT44mAAoJEKeha0olJ0NqWqIH/ig9p71l63OsHzQq9OPAR68Z Z+Cs5EIhzkX95uEeu5+fEdhWUNu4g/BUXHBteY+mSVJFw/n8tEFnw+xHR/tfBpQG VHK9nmLZKpGgmokyJBnRAHnUIAeCDJf/GoOZTH9fBjh6u/nVMY68kEX9QembNK5l 1za0tGpLDBu6rzyKLNtPHT3j3iAs/ZhvUC5kUcRit3GD0svcfXu8eHvK2eLAvBjx 6vfK3Z/ydvh2CJjql/rWizndt/izX3NNi7QOBt2DKQKNj01uCTTshq2NufN9iYue aWjajj7n8RDr1fUzsbU0qzs4nm7qPKvGepef14wIr6k9Bnx6+fd7w9qfYQQrHcc= =AWiQ -----END PGP SIGNATURE----- --gpsd4QmKKopFtB1p4qmMb3mcTOiP2ssC8-- From unknown Sun Sep 07 03:08:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?=E7=8E=8B=E7=90=A6?= Subject: bug#18863: closed (Re: bug#18863: grep -b bug) Message-ID: References: <544F8E26.5050207@redhat.com> <1414396150034.ter2o00kwoim0ak3r5n4v54b@android.mail.163.com> X-Gnu-PR-Message: they-closed 18863 X-Gnu-PR-Package: grep X-Gnu-PR-Keywords: notabug Reply-To: 18863@debbugs.gnu.org Date: Tue, 28 Oct 2014 12:39:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1414499943-24050-1" This is a multi-part message in MIME format... ------------=_1414499943-24050-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #18863: grep -b bug which was filed against the grep package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 18863@debbugs.gnu.org. --=20 18863: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18863 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1414499943-24050-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 18863-done) by debbugs.gnu.org; 28 Oct 2014 12:38:09 +0000 Received: from localhost ([127.0.0.1]:37281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj62K-0006E7-Qj for submit@debbugs.gnu.org; Tue, 28 Oct 2014 08:38:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33308) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj62G-0006Dq-LM; Tue, 28 Oct 2014 08:38:05 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9SCbxQv031791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Oct 2014 08:37:59 -0400 Received: from [10.3.113.180] (ovpn-113-180.phx2.redhat.com [10.3.113.180]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9SCbwj5002813; Tue, 28 Oct 2014 08:37:58 -0400 Message-ID: <544F8E26.5050207@redhat.com> Date: Tue, 28 Oct 2014 06:37:58 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: =?UTF-8?B?546L55Cm?= , 18863-done@debbugs.gnu.org Subject: Re: bug#18863: grep -b bug References: <1414396150034.ter2o00kwoim0ak3r5n4v54b@android.mail.163.com> In-Reply-To: <1414396150034.ter2o00kwoim0ak3r5n4v54b@android.mail.163.com> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gpsd4QmKKopFtB1p4qmMb3mcTOiP2ssC8" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 18863-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gpsd4QmKKopFtB1p4qmMb3mcTOiP2ssC8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tag 18863 notabug thanks On 10/27/2014 01:49 AM, =E7=8E=8B=E7=90=A6 wrote: > Hi, I found that "grep -b" doesn't work on my machine. the expected res= ult for below command is "7:not", but I got 0 $ echo gnu is not unix | gr= ep -b -o "not" 0:not Bash version 3.2.25 Linux version 2.6.18 Thanks. =E5= =8F=91=E8=87=AA=E9=82=AE=E7=AE=B1=E5=A4=A7=E5=B8=88 [your report was hard to read because you failed to use line wrapping] Thanks for the report. However, I cannot reproduce it on newer grep, and have to assume the error has either been fixed in the meantime. Therefore, I'm closing out this bug report, although you should feel free to make further comments or even reopen this if you can demonstrate that a problem still exists. $ grep --version | head -n1 grep (GNU grep) 2.18 $ echo gnu is not unix | grep -b -o not 7:not --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --gpsd4QmKKopFtB1p4qmMb3mcTOiP2ssC8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUT44mAAoJEKeha0olJ0NqWqIH/ig9p71l63OsHzQq9OPAR68Z Z+Cs5EIhzkX95uEeu5+fEdhWUNu4g/BUXHBteY+mSVJFw/n8tEFnw+xHR/tfBpQG VHK9nmLZKpGgmokyJBnRAHnUIAeCDJf/GoOZTH9fBjh6u/nVMY68kEX9QembNK5l 1za0tGpLDBu6rzyKLNtPHT3j3iAs/ZhvUC5kUcRit3GD0svcfXu8eHvK2eLAvBjx 6vfK3Z/ydvh2CJjql/rWizndt/izX3NNi7QOBt2DKQKNj01uCTTshq2NufN9iYue aWjajj7n8RDr1fUzsbU0qzs4nm7qPKvGepef14wIr6k9Bnx6+fd7w9qfYQQrHcc= =AWiQ -----END PGP SIGNATURE----- --gpsd4QmKKopFtB1p4qmMb3mcTOiP2ssC8-- ------------=_1414499943-24050-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Oct 2014 07:14:53 +0000 Received: from localhost ([127.0.0.1]:37134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj0zR-0003sd-DQ for submit@debbugs.gnu.org; Tue, 28 Oct 2014 03:14:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38959) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xif3r-00054l-Qv for submit@debbugs.gnu.org; Mon, 27 Oct 2014 03:49:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xif3c-0002eh-MW for submit@debbugs.gnu.org; Mon, 27 Oct 2014 03:49:50 -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,HTML_MESSAGE, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xif3c-0002ed-K3 for submit@debbugs.gnu.org; Mon, 27 Oct 2014 03:49:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xif3V-0002AX-58 for bug-grep@gnu.org; Mon, 27 Oct 2014 03:49:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xif3N-0002b8-MZ for bug-grep@gnu.org; Mon, 27 Oct 2014 03:49:33 -0400 Received: from m12-14.163.com ([220.181.12.14]:40018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xif3L-0002aN-U0 for bug-grep@gnu.org; Mon, 27 Oct 2014 03:49:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Subject:From:Date:MIME-Version:Message-ID; bh=OI4Cu mifU7GSvfsQ4TFw68sgZClY/ny4JLq5U3vlSSc=; b=ZGaSqwWDC6j1o3vcRTyB1 VXbcUKcYq75kDOf4hKuxUozqF6O5dOf/VT4vqdNlXqquHJsIOrPvSvQqCUs9ogDq In2leOq0hsYFotweEShc7Fmvcq+rORSWCi8hZOPd9kkAbfdBZU7HVjwWr1NWs3P0 TPhkzOJGwVnZ2DgYXomkyk= Received: from android.netease.mail (unknown [124.160.208.42]) by smtp10 (Coremail) with SMTP id DsCowEApCVH5+E1UWOF7Aw--.1289S2; Mon, 27 Oct 2014 15:49:15 +0800 (CST) X-Coremail-DSSMTP: 124.160.208.42 Subject: grep -b bug From: =?UTF-8?B?546L55Cm?= To: "bug-grep@gnu.org" Date: Mon, 27 Oct 2014 15:49:12 +0800 MIME-Version: 1.0 X-Priority: 3 Message-ID: <1414396150034.ter2o00kwoim0ak3r5n4v54b@android.mail.163.com> X-Mailer: Netease Android Mail Content-Type: multipart/alternative; boundary="__MESSAGE_BODY_PART__0" X-CM-TRANSID: DsCowEApCVH5+E1UWOF7Aw--.1289S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvj4Ri2-5DUUUU X-Originating-IP: [124.160.208.42] X-CM-SenderInfo: hztbu25looxtlqw6il2tof0z/xtbBoRwyHFQGu7Ff7wAAs7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 28 Oct 2014 03:14:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --__MESSAGE_BODY_PART__0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 SGksIEkgZm91bmQgdGhhdCAiZ3JlcCAtYiIgZG9lc24ndCB3b3JrIG9uIG15IG1hY2hpbmUuIHRo ZSBleHBlY3RlZCByZXN1bHQgZm9yIGJlbG93IGNvbW1hbmQgaXMgIjc6bm90IiwgYnV0IEkgZ290 IDAgJCBlY2hvIGdudSBpcyBub3QgdW5peCB8IGdyZXAgLWIgLW8gIm5vdCIgMDpub3QgQmFzaCB2 ZXJzaW9uIDMuMi4yNSBMaW51eCB2ZXJzaW9uIDIuNi4xOCBUaGFua3MuIOWPkeiHqumCrueuseWk p+W4iA== --__MESSAGE_BODY_PART__0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: base64 PGRpdiBzdHlsZT0nZm9udC1zaXplOjE1cHg7Y29sb3I6IzMzMzMzMztsaW5lLWhlaWdodDoyNHB4 Jz5IaSw8YnIvPkkgZm91bmQgdGhhdCAmcXVvdDtncmVwIC1iJnF1b3Q7IGRvZXNuJ3Qgd29yayBv biBteSBtYWNoaW5lLjxici8+dGhlIGV4cGVjdGVkIHJlc3VsdCBmb3IgYmVsb3cgY29tbWFuZCBp cyAmcXVvdDs3Om5vdCZxdW90OywgYnV0IEkgZ290IDA8YnIvPiQgZWNobyBnbnUgaXMgbm90IHVu aXggfCBncmVwIC1iIC1vICZxdW90O25vdCZxdW90Ozxici8+MDpub3QgPGJyLz5CYXNoIHZlcnNp b24gMy4yLjI1PGJyLz5MaW51eCB2ZXJzaW9uIDIuNi4xODxici8+PGJyLz5UaGFua3MuPGJyLz48 YnIvPuWPkeiHqumCrueuseWkp+W4iDxkaXY+ --__MESSAGE_BODY_PART__0-- ------------=_1414499943-24050-1-- From unknown Sun Sep 07 03:08:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18863: grep -b bug Resent-From: Norihiro Tanaka Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Tue, 28 Oct 2014 12:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18863 X-GNU-PR-Package: grep X-GNU-PR-Keywords: notabug To: Cc: 18863@debbugs.gnu.org Received: via spool by 18863-submit@debbugs.gnu.org id=B18863.141450032326140 (code B ref 18863); Tue, 28 Oct 2014 12:46:02 +0000 Received: (at 18863) by debbugs.gnu.org; 28 Oct 2014 12:45:23 +0000 Received: from localhost ([127.0.0.1]:37291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj69J-0006mm-U8 for submit@debbugs.gnu.org; Tue, 28 Oct 2014 08:45:22 -0400 Received: from mailgw06.kcn.ne.jp ([61.86.7.213]:57811) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xj69G-0006bl-O2 for 18863@debbugs.gnu.org; Tue, 28 Oct 2014 08:45:20 -0400 Received: from imp01 (mailgw5.kcn.ne.jp [61.86.15.231]) by mailgw06.kcn.ne.jp (Postfix) with ESMTP id 80C20C8007 for <18863@debbugs.gnu.org>; Tue, 28 Oct 2014 21:45:11 +0900 (JST) Received: from mail05.kcn.ne.jp ([61.86.6.184]) by imp01 with bizsmtp id 8clB1p00Z3yDdWd01clBaW; Tue, 28 Oct 2014 21:45:11 +0900 X-OrgRCPT: 18863@debbugs.gnu.org Received: from [10.120.1.78] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) by mail05.kcn.ne.jp (Postfix) with ESMTPA id 2015B7D00B4; Tue, 28 Oct 2014 21:45:11 +0900 (JST) Date: Tue, 28 Oct 2014 21:45:09 +0900 From: Norihiro Tanaka In-Reply-To: <1414396150034.ter2o00kwoim0ak3r5n4v54b@android.mail.163.com> References: <1414396150034.ter2o00kwoim0ak3r5n4v54b@android.mail.163.com> Message-Id: <20141028214508.75B4.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Mailer: Becky! ver. 2.65.07 [ja] X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) > Hi, I found that "grep -b" doesn't work on my machine. the expected > result for below command is "7:not", but I got 0 $ echo gnu is not > unix | grep -b -o "not" 0:not Bash version 3.2.25 Linux version 2.6.18 What is version of your grep? I trid your test case on CentOS 5.10, and I got the same results as you. As the bug was fixed in grep 2.6, it does not occur in grep 2.20 which is most recently version. $ uname -a Linux cent58 2.6.18-371.el5 #1 SMP Tue Oct 1 08:37:57 EDT 2013 i386 i386 i3= 86 GNU/Linux $ bash --version GNU bash, version 3.2.25(1)-release (i386-redhat-linux-gnu) =2E....... $ cat /etc/redhat-release CentOS release 5.10 (Final) $ echo gnu is not unix | env LC_ALL=3DC /bin/grep -b -o "not" 0:not $ env LC_ALL=3DC /bin/grep --version grep (GNU grep) 2.5.1 =2E....... $ echo gnu is not unix | env LC_ALL=3DC grep -b -o "not" 7:not $ env LC_ALL=3DC grep --version grep (GNU grep) 2.20 =2E....... Written by Mike Haertel and others, see .