Shell Script for Find And Replace

Here's a little shell snippet for finding and replacing text in multiple files:

for fl in *.txt; do
mv $fl $fl.old
sed 's/find/replace/g' $fl.old > $fl
done

Dec 29, 2010