Sunday, May 4, 2008

Useful find and replace stuff


Find files containing text:



grep -i -n 'foo' *

Find files containing text and replace them with something else:



sed -i 's/foo/bar/g' *

0 comments: