perl -ne "/Testwort/ ? $c=3 : $c--; print if $c>0;" test.txt