I want a shell script program for this purpose and here is my requirement.
I have two files 1.txt and 2.txt
In 1.txt I have the following contents:
label.abcd.1 = asdfgf
label.abcd.2 = qwerqwe
label.abcd.3 = zczxvzx
label.abcd.4 = ;lkjj;l
label.abcd.5 = pupoiup
and in 2. txt I have the following contents
label.abcd.1 = poiuppoiu
label.abcd.3 = iouyiuy
label.abcd.5 = uizxuci
label.abcd.6 = kxkjckvjh
label.abcd.7 = l;kjlkjlj;
Note the contents in 1.txt and 2.txt....... label.abcd.2,4 is removed and label.abcd.6,7 is added newly in 2.txt, and note the righthand side of 1.txt and 2.txt are different.
Now i want the content in 1.txt shd be like this
label.abcd.1 = asdfgf
label.abcd.3 = zczxvzx
label.abcd.5 = pupoiup
label.abcd.6 = kxkjckvjh
label.abcd.7 = l;kjlkjlj;
[label.abcd.6,7 are added and label.abcd.2,4 are removed.] Please Note: The right hand side of label.abcd.1,3,5 are not modified.
This is my requirement. I hope i have not confused u.....
Thanx in advance
Regards,
Naveen. V :)