diff Output Formats
diff has several mutually exclusive options for output format.
The following sections describe each format, illustrating how
diff reports the differences between two sample input files.
- Sample diff Input: Sample
diff input files for examples.
- Normal: Showing differences without surrounding text.
- Context: Showing differences with the surrounding text.
- Side by Side: Showing differences in two columns.
- Scripts: Generating scripts for other programs.
- If-then-else: Merging files with if-then-else.