I am currently playing with sed to get contents between two lines. I got a nice tutorial: http://www.cyberciti.biz/faq/unix-linux-sed-print-only-matching-lines-command/
In this tutorial, I found:
sed -n -e '/regexpA/,/regexpB/p' input.file
The command above will print also the lines matched regexpA
and regexpB
, but I would want to escape these two line, say these two matched lines would not print to STDOUT, is there any beautiful solution for this?
Thanks in advance.