bash-tutorial/tutorial/diff_patch.org

17 lines
410 B
Org Mode
Raw Permalink Normal View History

2023-02-21 19:03:10 +01:00
#+options: toc:nil num:nil
#+DATE: 2023-02-21
* Checking differences between two files and patching
Checking differences between two files and saving in a new file ("diff.patch"):
#+begin_src bash
diff -u new_file.org old_file.org > diff.patch
#+end_src
Using ~patch~ to include the differences in the second file to update the document:
#+begin_src bash
patch -u old_file.org -i diff.patch
#+end_src