I have a short file (around 60 lines) which acts like a basic database it has three whitespace separated columns. The first one is name of the product, the second one is the price and the third one is the qunatity.
product1 5 25 product2 8 30 product3 15 80 product4 2 200
Then I create a new file which contains some modifications in the same format
product1 5 45 product3 18 80 product5 5 25
After that I want to merge the two files into one and it should look something like this
product1 5 45 product2 8 30 product3 18 80 product4 2 200 product5 5 25
I tried using diff and patch but it removed the lines which were not present in the update file. How should I tackle this problem?