Thank you. I think it's a testament to the power of unix that two different people responded with solutions using different commands. I should have thought of sort, it feels natural in retrospect. Am I right in believing bash pipes are lazy enough that that won't require sorting the whole file, just pulling out four random lines?
As a side note, I'm guessing grep had -v before it became a standard for verbose? That's one of the hardest parts: it seems open source tools never change UI to help new users at the expense of old ones having to change workflows. A valid way of doing it, and as someone who's never contributed to anything open source I have no place to criticize. Just saying makes it harder. (And I'm realizing I haven't used any closed source software from a comprable time, so I have no idea if this is FOSS-specific)