An analyst must join a Cisco Umbrella DNS export to a Cisco Secure Endpoint event export on hostname and time, then write the matched rows. Why is a short Python script a better fit than one grep?
Select an answer to reveal the explanation.
Short Explanation
Joining two attendance sheets takes a clerk who can line up names and times, not a highlighter on one page. You parse both exports in Python, match hostname and time, and emit the joined result. One grep pass cannot line the two files up.
Full Explanation
The task needs a join, not a substring search. Parse both exports in Python, match rows on hostname and time, then emit the joined result so each output row carries the DNS context beside the endpoint event. Python can load both files, compare the hostname fields, apply a time window, and write the matches in one repeatable run. Run one grep pattern across a single export and assume the other file is already joined and you have only filtered one stream; grep does not pair records across two schemas. Paste both exports into a mailbox and ask each site to highlight matching hostnames and the work stays manual, slow, and easy to miss. Replace both exports with a fresh tcpdump capture taken on the analyst laptop and you discard the two historical sources for an unrelated packet capture that was not the question. Exam caveat: grep is still the right tool when the job is a single pattern inside one text file, which is a different job from a two-file join. Operational check: run the script on a small known pair of rows and confirm the emitted result contains the expected hostname once, with both timestamps beside it.