Red Hat Bugzilla – Bug 21113
grep options -v and -A/B/C don't work together
Last modified: 2007-04-18 12:29:56 EDT
With a sample textfile containing:
"grep 'BadLine' -v -B1" will simply pass everything on like cat.
It should just print "GoodLine" 4 times. The same happens for -A and -C.
How is this supposed to be wrong?
grep 'BadLine' -v will include anything but BadLine, meaning all instances of
GoodLine and Unknown.
Since -B1 asks for a context line, BadLine will be displayed as context for line