Sed move a line

Viewed 5500

I just need to move a line up in sed. I can select the line with

sed -i '7s///'

I need to move line 7 up 2 lines so it will be line 5.

I can't find anything on the internet to do this without complicated scripts, I can't find a simple solution of moving a specific line a specific number of times.

2 Answers
Related