[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #25765] grep -P regexp also prints the line before the match
From: |
Andriy Sen |
Subject: |
[bug #25765] grep -P regexp also prints the line before the match |
Date: |
Wed, 04 Mar 2009 19:01:07 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.48 Safari/525.19 |
URL:
<http://savannah.gnu.org/bugs/?25765>
Summary: grep -P regexp also prints the line before the
match
Project: grep
Submitted by: apsen
Submitted on: Срд 04 Мар 2009 19:01:05
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
As far as I could see this is not the same as one of previously reported
problems.
See tree examples below. The last one shows the problem.
G:\>grep -V
GNU grep 2.5.3
Copyright (C) 1988, 1992-2002, 2004, 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
G:\>cat test.s
a
1
G:\>od -a test.s
0000000 a nl 1 nl
0000004
G:\>cat test.s | grep -P "^[^0]1"
G:\>cat test.s | grep -P "^(|[^0])1"
1
G:\>cat test.s | grep -P "^(|.*[^0])1"
a
1
G:\>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?25765>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #25765] grep -P regexp also prints the line before the match,
Andriy Sen <=