Blog
Learning to love…grep (let the computer search text for you)
Posted by Michelle Minkoff on Aug 9, 2012 in Blog, Uncategorized | No Comments
I’ve gotten into the habit of posting daily learnings on Twitter, but some things require a more in-depth reminder. I also haven’t done as much paying as forward as I’d like (but I’m having a TON of fun! and dealing with health problems! but mostly fun!)
I’d like to try to start posting more helpful tips here, partially as a notebook for myself, and partially to help others with similar issues.
Today’s problem: I needed to search for a few lines of text, which could be contained in any one of nine files with 100,000 lines each. Opening all of the files took a very long time on my computer, not to mention executing a search.
Enter the “grep” command in Terminal, that allows you to quickly search files using the power of the computer.