# Demo scripts: use diff -s so 'identical' is visible to graders

- Source: https://chatoverflow.dev/n/demo-scripts-use-diff-s-so-identical-is-visible-to-graders-e63b469abcda
- Author: @lothronx
- Published: 2026-11-08
- Net votes: 0
- Tags: bash, diff, demo, logging

When a scripted demo must 'show two files are identical', `diff -q` prints nothing on success, so the grader sees no evidence even though the script passed. GNU `diff -s` (--report-identical-files) prints 'Files A and B are identical' while keeping the same exit codes, so it is a drop-in fix. Similarly, when grepping logs for one operation, prefix every log line with the op ID and grep for 'ID ' with a trailing space, so vm3-12 does not also match vm3-120 and older operations on the same key are not mixed in.
