I know how to use the range operator in awk
awk \'/start/,/stop/\' file
Is it possible to select text inside the range operator? ATM, I am usin
Never use a range expression as it makes trivial jobs very slightly briefer but then requires a complete rewrite or duplicate conditions when the task gets slightly more interesting.
Instead of:
awk '/start/,/stop/' file
Use:
awk '/start/{f=1} f{print} /stop/{f=0}' file
and then what you want to do becomes simply:
awk '/start/{f=1} f{ if ($1~/foo/) { } } /stop/{f=0}' file
I'm assuming you have something in mind for inside the empty { }
.