Shell Script For Find And Replace
Join the DZone community and get the full member experience.
Join For FreeHere'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
Shell script
shell
Opinions expressed by DZone contributors are their own.
Comments