Reputation: 3184
I like to compare two text files and save the difference under linux.
I know there are tools like kdiff, diff vimdiff etc. but my expectation are as follows.
Upvotes: 0
Views: 4852
Reputation: 6276
Save the changes to a file:
diff -Nur originalfile newfile > patchfile
Use the difference file to change the origin file:
patch originfile patchfile
I think this is the easiest way to save the changes and reload the changes. By the way, you can use this command the create an update-package.
Upvotes: 0
Reputation: 10549
Like,
#!/bin/bash
wdiff -w "\e[31m" -x "\e[0m" -y "\e[32m" -z "\e[0m" "$@";
replace \e by, well, the ASCII character with value 0x1A. Put the two commands into some file, and run it using redirection.
Upvotes: 0
Reputation: 1099
use tkdiff4 -w file-name1 file-name2
It fulfills all your requirements. Specific color might be an issue.
Upvotes: 1
Reputation: 33217
try colordiff
and man diff
for options for ignoring whitespace etc
Upvotes: 0