Date: Thu, 28 Apr 2011 19:25:35 GMT From: Artem Perekresny <kondybas@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: gnu/156704: Improper behaviour of GNU grep Message-ID: <201104281925.p3SJPZXd035473@red.freebsd.org> Resent-Message-ID: <201104281930.p3SJUAdq041308@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 156704 >Category: gnu >Synopsis: Improper behaviour of GNU grep >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 28 19:30:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Artem Perekresny >Release: 386/7.3p4 am64/8.2 >Organization: Private person >Environment: FreeBSD relay.maltitek.rv.ua 7.3-RELEASE-p4 FreeBSD 7.3-RELEASE-p4 #0: Sun Mar 6 12:00:45 EET 2011 artem@relay.maltitek.rv.ua:/usr/src/sys/i386/compile/MTEK i386 >Description: grep (GNU grep) 2.5.1-FreeBSD fails on "-o" option When pattern is alternatives joined with "|" option "-o" produce every possible matches ignoring "^", "\<", "\b" etc. >How-To-Repeat: # cat file.txt ABCD # egrep -o "^A" file.txt A # egrep -o "^B" file.txt # egrep -o "^A|^B|^C|^D" file.txt A B C D # cat file2.txt DCBA # egrep -o "^A|^B|^C|^D" file2.txt D C B A # >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104281925.p3SJPZXd035473>