Consider the simplified file
AAA BBB CCC1 DDD EEE CCC2 DDD FFF GGG CCC3 HHH
I can pick out the range
sed -n '/EEE/,/FFF/p'
Suppose though that I want to print any line containing
C but only within the matching range. I can pipe the result from
sed -n '/EEE/,/FFF/p' | grep 'C'
I could also do the range and match in a little
awk script (or
python, etc.). But how would I do this using just one invocation of