> cat file20
line 100
a
b
c
d
line300
a
s
d
f
s
line200
a
s
d
a
> tail +`cat -n file20 | grep "line300" | awk '{print $1}'` file20 | head -10
line300
a
s
d
f
s
line200
a
s
d
The previous solutions are NICER, but this uses some commands in unusual ways, so I thought it would be interesting (and educational) to see them used in this manner.
Explained:
I put a line number with each of your lines
grep for the requested text
determine its line number
start my display at that line number
and continue for ten lines