I have the file
Line 1
Line 2 MATCH
Line 3
Line 4
Line 1
Line 2 MATCH
Line 3
Line 4
And I want to swap the line with "MATCH" and "Line 1" for every case. I tried to search in other questions, but those move the line with the match to the last line and I don't understand so well the code to remake my version for a final output like:
Line 2 MATCH
Line 1
Line 3
Line 4
Line 2 MATCH
Line 1
Line 3
Line 4