bash-tutorial/tutorial/diff_patch.org

410 B

Checking differences between two files and patching

Checking differences between two files and saving in a new file ("diff.patch"):

  diff -u new_file.org old_file.org > diff.patch

Using patch to include the differences in the second file to update the document:

  patch -u old_file.org -i diff.patch