bin/173673: BSD fgrep -v is broken for multi-line pattern

Andrey Chernov ache at FreeBSD.org
Sat Nov 17 03:10:00 UTC 2012


>Number:         173673
>Category:       bin
>Synopsis:       BSD fgrep -v is broken for multi-line pattern
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 17 03:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Chernov
>Release:        FreeBSD 9.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD xxxxxxxxx.xxxxxxx.xx 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #5 r242933: Tue Nov 13 06:04:18 MSK 2012 ache at xxxxxxxxx.xxxxxxx.xx:/sys/i386/compile/POBRECITA i386

>Description:
	BSD fgrep -v do different things than gnu fgrep for multi-line
	pattern. Run following simple test. For BSD fgrep it prints
1
2
3
	and for gnu fgrep it correctly prints
3
>How-To-Repeat:
------------------------ cut here ----------------------
#!/bin/csh

(echo 1; echo 2; echo 3) | fgrep -v "1\
2"

(echo 1; echo 2; echo 3) | gnugrep -F -v "1\
2"
------------------------ cut here ----------------------
>Fix:

	


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list