Very late answer. However, this might help others with a similar problem/question.
I would recommend creating and applying a patch. A nice example can be found
here.
For example, assuming that a new.txt file contains changes that you want to apply to old.txt. You can execute the commands on a terminal or by creating and executing a patch_file.sh.
Command line: open a terminal and copy and execute the lines below (change the file names as necessary):
diff old.txt new.txt > patch.patch # to create the patch
patch old.txt -i patch.patch -o patched_old.text # to apply patch
Script: using an .sh file approach. In a terminal (keyboard: ctrl+alt+t:
gedit patch_file.sh
Copy and paste the commands that would go on the terminal, to the .sh file and below the header as shown below (gedit).
#!/bin/sh
diff old.txt new.txt > patch.patch # to create the patch
patch old.txt -i patch.patch -o patched_old.text # to apply patch
Make the script executable (terminal):
chmod +x patch_file.sh
Run the script (terminal):
./patch_file.sh # may require sudo access depending on the directory affected