Delete lines containing the pattern and the line before
4941
Delete range of lines above pattern with sed (or awk)
50542
Remove lines from file up to a pattern, unless the pattern doesn't exist
43159
Print lines between (and including) two patterns
10652
Removal of lines with no more or fewer than 'N' fields?
155976
How to join a line with a pattern with the next line with sed?
49190
Remove line of exactly n characters
16791
Delete all lines of text that isn't all numbers
85973
Replace a string before a certain line
80516
Return previous line of all matches
107683
Delete columns in text files with specific string
59603
How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?
4978
Delete Every line with that Word
105605
Find each line matching a pattern but print only the line above it
19143
Delete everything before "/" on every line
142565
How to replace only the Nth occurrence of a pattern in a file?
14843
How to remove blank lines from a file (including tab and spaces)?
75453
How do I remove newline character from lines preceding a particular pattern?