cd /dir for i in *; do cat "$i" | sed -e "s/width=\"100\"/width=\"200\"/g" > /tmp/tmpfile && cat /tmp/tmpfile > "$i"; done