[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in grep when using both --after-context and --invert-match
From: |
Oni Studio |
Subject: |
Bug in grep when using both --after-context and --invert-match |
Date: |
Fri, 04 Nov 2005 16:21:00 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
Hi there,
I was working on a way to exclude 4 lines from a bind configuration file
using grep.
However i might have found a bug trying to use both --after-context and
--invert-match at the same time.
The following command produces the proper file-selection which i would
like to exclude from the given file:
grep -A4 'zone "domain.com' /etc/bind/zones
Logically, i tried:
grep -v -A4 'zone "domain.com' /etc/bind/zones > /etc/bind/zones.new
This did not produce the desired effect. Instead grep just outputs the
entire file-content (without changes).
Is it a bug or an unsupported feature?
Im running grep (GNU grep) 2.5.1 on Debian Sarge (kernel : 2.6.8-2-686-smp)
Good luck,
Fili Wiese
- Bug in grep when using both --after-context and --invert-match,
Oni Studio <=