Sit right back and I'll tell you a tale. Fortune is a parasite glommed over the original intents of the Architecture of what is now known as Fortune.<p>Originally as the high gods intended the whole mess was nothing but a Rolodex, a box of index cards, etc.<p>You see, the first line of the '%' delimited records would be a 'LAST FIRST PHONE' and the rest would be for instance 'SMITH, JOE 867-5309' on the rest would be 'wife Mary, 3 kids (Joseph, Adam, Beth), maybe address, etc.'.<p>The '.dat' portion created by the 'strfile' would take that file and alphabetize it and then keep the 'seek' offsets in the file for each record. This let you have a big (for the time) Rolodex with fast retrieval upon search. Binary tree and all that, plus fast read of whole record because ... binary search, read one line match or not then difference between match and next record would be bytes needed to read (minus 1 for the '%'.<p>Fortune 'fortune(6)' started life as an address book,The random and multiple files and all that jazz was just a bunch of repurposing that took over and became a life of it's own. Nobody uses the 'first line sort' bit of 'strfile' program. Mostly the original has vanished into the wind, I have no clue what the command line thing was to bring up the Rolodex/Index Card of somebody was.<p>The 'man' page doesn't do it justice, but nobody really cares, and I like many others have a '~/quotes' file that is automated and hot-key bound to selecting a bit of text and preassing a couple of keys. If you know the <a href="https://en.wikipedia.org/wiki/Reservoir_sampling" rel="nofollow">https://en.wikipedia.org/wiki/Reservoir_sampling</a> thing, you dont' even need the '.dat' file for the random bit.