瀏覽代碼

sdiff: add page (#3304)

Natechawin Suthison 5 年之前
父節點
當前提交
8edaf18d93
共有 1 個文件被更改,包括 23 次插入0 次删除
  1. 23 0
      pages/common/sdiff.md

+ 23 - 0
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}}`