Sed commands

From Peter Pap's Technowiki
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