Tips on sed

Replace String

MyString=" ... "</code> by <code>MyString="NOTFOUND"
cat file.xml | sed 's/\(MyString=\)\(.*\)/\1"NOTFOUND"/'

Delete all but a range of lines found between two regexp

cat loop_tree.tex | sed '/regexp1/,/regexp2/!d'

Rename all files names "mystring_file..." to "file..."

for f in `ls *mystring*`; do mv $f `echo $f | sed 's/mystring_//'`; done

Replace inside a file”

sed -i 's/ugly/beautiful/g' myfile.txt