Hi,
Something like this should work:
sed -n '/StringA/,/StringB/p' infile
The above will only print what's between StringA and StringB (both are included in output).
You can use regular expressions for line ranges in sed. Instead of the 'standard' 1,4 (print lines 1 to 4) you can do /xxx/,/yyy/ where xxx and yyy are reg. expr. You can also combine them (1,/zzz/).
Hope this helps.
|