I want to find common line in two files and replace the next line of first file with the next line of second file. (sed,awk,perl,bash any solution is welcomed ) Case Ignored. Multiple Occurrence of same line.
File 1:
hgacdavd
sndm,ACNMSDC
msgid "Rome"
msgstr ""
kgcksdcgfkdsb
msgid ""
hsdvchgsdvc
msgstr ""
dhshfjksdfhmd
msgid "Vidya"
msgstr ""
sdjhcbnd
dcndnv
cfnkdndvrknvkf
dfkvrnkdfnk
snfvrkng
msgid "Rome"
msgstr ""
wdbhkjbcfj
#dmcdmf
f,nvdf,
fvnfnvk
vfmf,mv
vfn
msgid "vid"
msgstr ""
dmcbdmbcvmfbvmkhsdk
file 2:
dfhkvgjbfrvkf
msgid "Rome"
msgstr "new bie"
sdbsjbcdcbwoido
fjcdcvnm
msgid "vidya"
msgstr "expert"
dvnjfkdvhnkfvnknsbdjh
msgid "vid"
msgstr "newton"
dfenfjdbrfjbvlfnvl
dcnkncvkdfvknfv
fcndkbvknfkv
vfdnkvnfknbvkfn
Later File 1 should be:
hgacdavd
sndm,ACNMSDC
msgid "Rome"
msgstr "new bie"
kgcksdcgfkdsb
msgid ""
hsdvchgsdvc
msgstr ""
dhshfjksdfhmd
msgid "Vidya"
msgstr "expert"
sdjhcbnd
dcndnv
cfnkdndvrknvkf
dfkvrnkdfnk
snfvrkng
msgid "Rome"
msgstr "new bie"
wdbhkjbcfj
#dmcdmf
f,nvdf,
fvnfnvk
vfmf,mv
vfn
msgid "vid"
msgstr "newton"
dmcbdmbcvmfbvmkhsdk