Sed commands

From Peter Pap's Technowiki
Revision as of 06:12, 5 July 2011 by Ppapa (talk | contribs) (Created page with " == Find and Replace == for file in `find . -type f | awk -F/ ' { print $2 }'` do sed -e 's/find/replace/g' < $file > /tmp/$file; mv /tmp/$file $file done")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Find and Replace

for file in `find . -type f | awk -F/ ' { print $2 }'`
do
sed -e 's/find/replace/g' < $file > /tmp/$file;
mv /tmp/$file $file
done