From 8edaf18d93fa95b264a6f3a1fe5338c6de04e677 Mon Sep 17 00:00:00 2001 From: Natechawin Suthison Date: Sat, 5 Oct 2019 17:56:02 +0700 Subject: [PATCH] sdiff: add page (#3304) --- pages/common/sdiff.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/sdiff.md diff --git a/pages/common/sdiff.md b/pages/common/sdiff.md new file mode 100644 index 000000000..f1a824c8d --- /dev/null +++ b/pages/common/sdiff.md @@ -0,0 +1,23 @@ +# sdiff + +> Compare the differences between and optionally merge 2 files. + +- Compare 2 files: + +`sdiff {{path/to/file1}} {{path/to/file2}}` + +- Compare 2 files, ignoring all tabs and whitespace: + +`sdiff -W {{path/to/file1}} {{path/to/file2}}` + +- Compare 2 files, ignoring whitespace at the end of lines: + +`sdiff -Z {{path/to/file1}} {{path/to/file2}}` + +- Compare 2 files in a case-insensitive manner: + +`sdiff -i {{path/to/file1}} {{path/to/file2}}` + +- Compare and then merge, writing the output to a new file: + +`sdiff -o {{path/to/merged_file}} {{path/to/file1}} {{path/to/file2}}`