Show lines unique to each file or common to both.
Section: sed awk and Structured Text Workflows
Compare sorted files line-by-line
bash
bash
comm -3 <(sort old.txt) <(sort new.txt)Explanation
Handy for diffing identifier lists and inventory files.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing sed awk and Structured Text Workflows