Show the initial file.
Create a duplicate with line numbers.
Set variable mline equal to first occurence of ABC.
Echo variable $mline.
Use awk to find line number > 3 (value of ml) and the word blah.
Note that I did not find the earler blah entries.
[I believe with awk, a couple of those steps could be skipped by utilizing the record number parameter.]
Code:
> cat file73
blah
blah
ABC
123
456
789
DEF
yech
yech
blah
blah
> cat -n file73 >file73.n
> mline=$(grep -n ABC file73 | head -1 | cut -d":" -f1)
> echo $mline
3
> awk -v ml=$mline '$1>ml && $2=="blah" {print}' file73.n
10 blah
11 blah