Get a grep

I’m real excited about this week’s tool, because it’s less of a tool and more of a ‘hack.’ If you’re still unclear on what that means (and I don’t blame you), a hack is just a shortcut, or an easier way to do things (usually on a computer).

We’re going to use the command line. On Macs, it’s called the Terminal. On Windows, it’s the Command Prompt. I don’t know what it’s called on Linux, but if you’re using Linux, you probably know.

It looks kind of cool and hacker-y, but unfortunately we’re not gonna do any cool hacker things. For now, we’ll just use a simple command called grep, which lets you to search a huge amount of data very, very fast. If you ever need to find a needle in a haystack, grep is your guy. Right now, I just use it to search for tools that have already been covered in TFR.

You just type “grep” into the command line, followed by the word you’re looking for, followed by the place where you’re looking for it. A lot like the Find function in Excel.

For instance, when I checked to see if Evernote had been covered, I navigated to my folder of old TFR posts and typed in “grep -r evernote .” This uses a couple of advanced search options, which you may want to mess around with.

It looks a little Matrix-y, which can be off-putting, but as you can see, it pulled up everything in my folder that had to do with Evernote. This is extremely useful if you’re searching through a LOT of data. I taught myself to use grep when I needed to search hundreds of thousands of rows of data – too much for even for Excel or SQL Server to search through.

If you’re wary of using the command line, can’t figure out how to navigate to a folder, or think you’ve got a great use for grep, I’d be happy to talk it over more. See you all next week!