LAB4-CP2-Q2
top-N pipeline
Checkpoint 2: Pipes
5 pts
Build pipeline: sort words.txt | uniq -c | sort -rn | head. Top-N frequency.
Exam questions that reference this lab question
- CSCD240-E1-A-Q38 directly_tests Count distinct lines in visitors.txt (unsorted input).
- CSCD240-E1-A-Q50 directly_tests auth.log line format "2026-04-14 08:31 FAIL user=alex src=10.x". Print top-3 FAIL source IPs, count first, most-frequent first.
- CSCD240-E1-B-Q19 directly_tests Top 5 source IPs in FAIL lines of auth.log, where IP is field 5.
- CSCD240-E1-B-Q20 directly_tests Count distinct usernames on FAIL lines of auth.log where username is "user=<name>".