Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mileszs
on June 5, 2009
|
parent
|
context
|
favorite
| on:
Useful command-line scripts for web developers (or...
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.
Consider applying for YC's Winter 2027 batch!
Applications
are open till November 2.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: