piranha / goreplace

command line tool for search and replace
ISC License
185 stars 14 forks source link

[FR] Apply replace only on lines that match a pattern #30

Open raine opened 9 years ago

raine commented 9 years ago

Something like:

-l, --only-lines=RE           apply replace only on lines that match a pattern

So that you can easily scope your search-and-replace to only apply on certain lines if you're replacing a common phrase.

piranha commented 9 years ago

I like the idea! Not sure if I'll have time to work on that soon, so pull requests are very much appreciated. :)

raine commented 9 years ago

Any takers?

I might take a stab at this when I have time to learn Go at the same time.