TMPFILE=tmp.$$ for f in *.php do sed -i 's/link_id/con' $f > $TMPFILE; #exit 1 # DEBUG mv $TMPFILE $f; done