For grep's sake
Just now, I needed to find a line with the phrase 'valid' in it. Unfortunatly, there were thousands of such lines. I narrowed down the list by embedding a one greps output in another. The file list to search is constructed by a grep statement that searches for shell scripts aka "\#\!/bin". I use this file sublist to search for another word like so:
grep "valid" `grep -rIl "\#\!/bin" *`
what fun!
grep "valid" `grep -rIl "\#\!/bin" *`
what fun!

0 Comments:
Post a Comment
<< Home