Difference between revisions of "Replace text between two lines SED"

From Michael's Information Zone
Jump to navigation Jump to search
(Created page with "<ref>https://nixtricks.wordpress.com/2013/01/09/sed-delete-the-lines-lying-in-between-two-patterns/</ref> *Remove the lines between the patterns. <pre> sed '/PATTERN-1/,/PATTE...")
 
(No difference)

Latest revision as of 14:35, 21 July 2017

[1]

  • Remove the lines between the patterns.
sed '/PATTERN-1/,/PATTERN-2/{//!d}' input.txt