for file in *.toc.shtml do sed -e's/.html.shtml/.shtml/g' \ $file > $file.new mv $file.new $file done