[Nottingham] A little scripting on a Sunday evening (help please)

Roger Light rogerlight at gmail.com
Sun Apr 9 19:49:15 BST 2006


On 09/04/06, Michael Simms <michael at tuxgames.com> wrote:

> cat $1 | sed -e "s/\.html/\.php/g" > /tmp/fixing
> mv /tmp/fixing $1

If you've got a decent sed (gnu sed is fine, sun sed ain't, you should
be able to do

sed -i $1 "s/\.html/\.php/g"

-i does editing in place of a file.

Thanks,

Roger


More information about the Nottingham mailing list