tips:linux:replacefiles
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tips:linux:replacefiles [2009/06/08 15:28] – created erik | tips:linux:replacefiles [2020/05/30 04:54] (current) – erik | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== 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 ' | ||
| + | done | ||
| + | </ | ||
