Signal9Signal9 — home
online
back to labs

Dojo: Who's on the List but Gone

MediumOne-Liner Dojo10 min
The brief

Two sorted rosters: /root/all-users.txt is every account ever provisioned; /root/active-users.txt is who's still active. In ONE line, print the usernames that appear in all-users but NOT in active-users (the departed accounts) and write them to /root/answer.txt.

This is a set difference on two already-sorted files — the classic job of comm. Suppress the columns you don't want.

What you'll do
  • Write the lines present in all-users.txt but absent from active-users.txt to /root/answer.txt, in one line

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