Złap linie po wzorze

grep -A 5 AAA ./your_file

it grep five lines after AAA
Hutch Polecat