On Mon, 2005-06-20 at 11:03, David wrote:
> thanks Tony.... but the bit that is mostly tricking me is going through 
> the directory recursively to get to each file. I didn't mention the 
> recursive thing in my original post - there are several hundred files in  
> a directory tree ( a web site).

Use find, sideshow David!

To find all regular files under /path/to/website and feed them as
arguments to the perl snippet:

find -xtype f /path/to/website | xargs perl -i -pe
's/foo.bar/bar.foo/g;s/\r/\n/g'

I haven't tested that yet. Nor have I finished my morning caffeine hit.
Your mileage will most likely vary.

-- 
Pete

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to