34/60
Sign inSign up free

742. Who Is Missing, Who Shouldn't Be There?

easy 10 XP ~8 minHands-on lab

Access reviews compare the list of people who should have admin access with who has it. Write /home/student/bin/diff-users.sh EXPECTED ACTUAL (two files, one name per line, unsorted, possibly with duplicates and blank lines).

Task

  • Print missing: <name> for each name in EXPECTED but not in ACTUAL, then extra: <name> for each name in ACTUAL but not in EXPECTED. Within each group, names are sorted and appear once.
  • Ignore blank lines and spaces around names.
  • Exit 0 when the lists match, 1 when they differ, and 2 (with a message on stderr) when a file can't be read.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.