Skip to content Skip to sidebar Skip to footer
Showing posts with the label Grep

Recursively Traverse Directory And Replace Function Calls

I would like to traverse a directory recursively and find all files that have at least one of the f… Read more Recursively Traverse Directory And Replace Function Calls

Find In Files Using Ruby Or Python

A popular text editor has the following 'find in files' feature that opens in a dialog box:… Read more Find In Files Using Ruby Or Python

Using Subprocess To Get Output Of Grep Piped Through Head -1

The gist of what I'm trying to do is this: grep -n 'some phrase' {some file path} | hea… Read more Using Subprocess To Get Output Of Grep Piped Through Head -1

Grep For A Word, And If Found Print 10 Lines Before And 10 Lines After The Pattern Match

I am processing a huge file. I want to search for a word in the line and when found I should print … Read more Grep For A Word, And If Found Print 10 Lines Before And 10 Lines After The Pattern Match