{ "name": "uniq", "section": 1, "title": "report or filter adjacent duplicate lines", "synopsis": ["uniq [-c] [-d] [-u] [INPUT]"], "description": "Filters adjacent duplicate lines (input should be sorted for POSIX semantics). Optional OUTPUT operand is accepted for familiarity but ignored; use shell redirects.", "options": [ { "flag": "-c, --count", "meaning": "Prefix lines with occurrence counts" }, { "flag": "-d, --repeated", "meaning": "Only print duplicate lines (one per group)" }, { "flag": "-u, --unique", "meaning": "Only print lines that appear once" }, { "flag": "-h, --help", "meaning": "Print usage" } ], "keywords": ["uniq", "bare-os", "coreutils"], "examples": [ { "caption": "unique sorted lines", "code": "sort names.txt | uniq" }, { "caption": "counts", "code": "sort log | uniq -c" } ], "listCategory": "coreutils" }