News for hackers. Stuff that matters.
Re:Useful command-line scripts for web developers (or anyone... by mileszs on Friday June 05, 2009 @10:10AM (#643193)
I use a function that looks like this:

  find $1 -name $2 | xargs egrep -nC3 $3 | less
So, say:

  find ./ -name "*.rb" | xargs egrep -nC3 'gsub' | less
You'll get the matching line, three lines before and three lines after, as well as file name and line numbers.

There are no comments on this comment yet.