User Tools

Site Tools


tips:linux:replacefiles

This is an old revision of the document!


How to find and replace on many files?

The following commands make it easy to find and replace some text in a set of files:

for fl in *.txt; do
mv $fl $fl.old
sed 's/find/replace/g' $fl.old > $fl
done
tips/linux/replacefiles.1244474944.txt.gz · Last modified: 2009/06/08 15:29 by erik