sed regular expressions

Q. How do I find the text between the strings FOO and BAR inclusive using sed command line option?


Q. How do I use sed for selective deletion of certain lines? I have text as follows in file: Line 1 Line 2 WORD1 Line3 Line 4 WORD2 Line5 I would like to delete all lines between WORD1 and WORD2 to produce final output: Line 1 Line 2 Line5 A. For selective deletion of certain […]