Here is a useful unix command I used today to find and replace text across multiple files and multiple directories.
find . -type f -exec sed -i "s/string1/string2/g" {} \;
This will replace all instances of string1 with string2.
Credit to Google and http://www.sb.fsu.edu/~soma/Proj/How-to/Search+Replace.pdf for helping me figure this out.
Showing posts with label sed. Show all posts
Showing posts with label sed. Show all posts
Tuesday, June 9, 2009
Subscribe to:
Posts (Atom)