Compare and then merge, writing the output to a new file

sdiff

  • Compare the differences between and optionally merge 2 files.
    More information: <https://manned.org/sdiff>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sdiff -o {{path/to/merged_file}} {{path/to/file1}} {{path/to/file2}}

click the source code to copy install sdiff on any operating system with command-not-found.com