comm
Compare two sorted files line by line, returning structured JSON with unique and common records. Requires pre-sorted input.
Instructions
Compare two sorted files line by line, returning column-tagged records (unique to file1, unique to file2, common). Read-only, no side effects. Requires pre-sorted input — use 'sort' first. Returns JSON with structured comparison results. Use to find differences and overlaps between datasets. Not for unsorted data — results are wrong without prior sorting. See also 'join', 'uniq', 'sort'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| encoding | No | Text encoding. | utf-8 |
| max_lines | No | Maximum JSON records to emit. | |
| paths | Yes | Two files to compare. | |
| raw | No | Write column-tab-line text without a JSON envelope. | |
| suppress_1 | No | Suppress records unique to the first file. | |
| suppress_2 | No | Suppress records unique to the second file. | |
| suppress_3 | No | Suppress records common to both files. |