Sorted inventory comparison
Compare two sorted account inventories without modifying either file.
Understand the pattern
Comparing sorted inventories with comm helps operators explain what they know before they change anything.
cat- Read one or more files to standard output without editing their contents.
Reading a source file should precede changing it; avoid printing real secrets.
comm- Compare sorted line sets and select unique or common columns.
Both inputs must be sorted under the same ordering rules.
Worked example and expected result
$ cat data/users-a.txtadmin learner www-data
Exit status: 0. The command completed successfully in the training fixture.
$ cat data/users-b.txtbackup learner www-data
Exit status: 0. The command completed successfully in the training fixture.
$ comm data/users-a.txt data/users-b.txtadmin backup learner www-data
Exit status: 0. The command completed successfully in the training fixture.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Restore copy verificationTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.