I had a sneaking suspicion that my post about using BBEdit to process text might tempt Dr. Drang to write a nerdy follow-up post or two, and it did:
One of the cleverest things Jason does, which I think he undersells, is nibble away at the dataset as he processes it. In this screenshot we see that “Delete matched lines” is checked. By deleting each set of entries as he finds them, he makes it easier to develop the criteria for finding the next set. And with “Copy to clipboard” checked, he hasn’t lost the entries he’s just found—they’re ready to be pasted into a new document for checking and counting. This nibbling technique is one I’ve never used but will keep in mind the next time I’m faced with this type of problem.
Drang, of course, compliments me before displaying how he can do a lot of what I did with a single Terminal command:
sort cancolors.txt | uniq -c | sort -nr
Drang’s command doesn’t weed out misspellings, which is why I used my approach (and also because I had never even considered using Terminal commands to do this!). Anyway, if you’re curious about how many ways you can misspell Bondi Blue, here’s the list that came out of my survey results when I used Drang’s script.
—Linked by Jason Snell