Skip to content

Instantly share code, notes, and snippets.

@CMCDragonkai
Last active June 13, 2018 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CMCDragonkai/ffeff0e4291c3a17491f2b5bd77467dd to your computer and use it in GitHub Desktop.
Save CMCDragonkai/ffeff0e4291c3a17491f2b5bd77467dd to your computer and use it in GitHub Desktop.
CLI Merging of Text Files (Opposite of `diff`) #cli

CLI Merging of Text Files

The opposite of diff turns out to be sdiff which is distributed in the same package.

Use it like this:

sdiff --output=./merged file1 file2

It will open up a prompt that has commands. Use v or s to merge common lines automatically and eb to edit changes in your EDITOR.

There used be a merge command as part of the RCS package. But nobody uses RCS anymore so it's not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment