The problem at hand is, copying multiple lines from one file and paste at some specific line# on the other.
Say File1
File 2
I need to copy two lines from file1 and paste them before line 3 on file2
Output File2 looks like
Can SED be used to do that? How?
Though I am well versed in vim, never used sed before. But since my number of lines are huge (500+), it becomes tough to do so in vim.
Or is there any other way? (than visual mode in vim)
TIA.
Say File1
Line 1
Line 2
Line 3
Line 4
File 2
Line A
Line B
Line C
Line D
I need to copy two lines from file1 and paste them before line 3 on file2
Output File2 looks like
Line A
Line B
Line 2
Line 3
Line C
Line D
Can SED be used to do that? How?
Though I am well versed in vim, never used sed before. But since my number of lines are huge (500+), it becomes tough to do so in vim.
Or is there any other way? (than visual mode in vim)
TIA.
Last edited: