Easiest way to recursively find and replace?
Posted
by FarmBoy
on Stack Overflow
See other posts from Stack Overflow
or by FarmBoy
Published on 2010-03-31T14:13:46Z
Indexed on
2010/03/31
14:23 UTC
Read the original article
Hit count: 273
grep
|search-and-replace
I want to recursively search through a directory of text files and replace every occurrence of foo
within the files with bar
. What is the easiest way to accomplish this?
I imagine that grep would do the job in one line, but I can't seem to find an example of this.
I'm working in OS X.
© Stack Overflow or respective owner