Home | Mirror | Search |
http://sed.sourceforge.net/
sed -i -e 's/aaa/bbb/g' * perl -p -i -e 's/aaa/bbb/g' *
ls -1 *.html| awk '{printf "sed \047s/ADDRESS/address/g\047 %s >%s.sed;mv %s.sed %s\n", $1, $1, $1, $1;}'|bash for f in `ls -1 *.html`; do [ -f $f ] && sed 's/<\/BODY>/<script src="http:\/\/www.google-analytics.com\/urchin.js" type="text\/javascript"><\/script>\n<script type="text\/javascript">\n_uacct = "UA-2033740-1";\nurchinTracker();\n<\/script>\n<\/BODY>/g' $f >$f.sed;mv $f.sed $f ; done;
my=/root/dir str="/root/dir/file1 /root/dir/file2 /root/dir/file3 /root/dir/file/file1" echo $str | sed "s:$my::g"