21 Sep
2001
21 Sep
'01
11:47
On Fri, 2001-09-21 at 10:23, Derek Harding wrote:
Hi folks,
I need to go through a whole tree checking every (html) file and replacing every instance of "\" with "/". Anyone got a ready made script?
find . -type f -name '*.html' -print0 | xargs --null \ perl -i.bak -pe 'tr:\\:/:'
will leave the original files in filename.bak
The -print0 to find, and --null to xargs mean that strange filenames with spaces etc would work too.
With many thanks to Nigel - this seems to be what I need. -- Best wishes, Derek Harding, (BA MIAP) ICT & Network Manager hardingd@warlingham.surrey.sch.uk