1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 23:22:07 +02:00
tldr/pages/common/sdiff.md
2019-10-05 11:56:02 +01:00

23 lines
579 B
Markdown

# 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}}`