On 04/25/2018 03:00 PM, Joshua Nelson wrote:
$ cat tmp.txt > hi > hello > test > hey there > > $ grep -A 3 -m 1 h tmp.txt > hi >
> ``` > > Expected behavior: > hi > hello > test

Surely the output you expect should be:

hi
hello
test
hey there

because the "hey there" line is the third line of trailing context after the "hi" line. Anyway, the problem you're reporting was fixed in grep 3.1, so please try upgrading to the current version of grep.





Reply via email to