i need to find a command to delete lines from pattern_1 to the second occurence of pattern_2 (pattern_1 and second occurence of pattern_2 included) with sed.
random_line_1
pattern_1
pattern_2
random_line_3
random_line_4
random_line_5
pattern_2
random_line_6
i need to obtain :
random_line_1
random_line_6
I tried lots of commands inspired by what i have found everywhere but nothing works...
any idea?