Signal9Signal9 — home
online
back to labs

Process Substitution

MediumCommand Line Guru20-25 min
The brief

Two config snapshots need comparing without leaving temp files lying around. Write a script at /root/case/diffcheck.sh that diffs the SORTED contents of /root/case/a.txt and /root/case/b.txt using process substitution — feeding each command's output to diff as if it were a file, with no intermediate temp files. The script must be executable and exit cleanly (status 0) even when the inputs differ. Grading traces the run and checks that diff really received process-substituted, sorted input.

What you'll do
  • Create an executable script at /root/case/diffcheck.sh
  • Compare two command outputs with process substitution
  • Avoid temporary files, and exit cleanly even when they differ

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.