Stuff
Wednesday, October 24, 2007
Search and Replace
Search and Replace (and destroy!) for file in *.*; do sed 's/Procedures.html/Procedures.php/g' $file > tmp.$file; [ -s tmp.$file ] && mv tmp.$file $file; done
Or superior:
find ./ -type f -exec sed -i ’s/string1/string2/’ {} \;
1 comment:
Greg
12/19/2008 11:36 AM
http://www.jonasblog.com/2006/05/search-and-replace-in-all-files-within-a-directory-recursively.html
Reply
Delete
Replies
Reply
Add comment
Load more...
‹
›
Home
View web version
http://www.jonasblog.com/2006/05/search-and-replace-in-all-files-within-a-directory-recursively.html
ReplyDelete