hi, I'm using 3.8, and I hate to bother, but I have spent two days on the net trying to find the answer to this problem.

I am using 'find' to batch file a sed search and replace. Sed, of course, outputs to stdout, the problem I am having is finding the correct syntax so that I can change the extension of the input file to create the new output file. For example:

Find . -name "*.htm" -exec 'sed s/old/new/' > '{}'.new

From what I've read, I should be able to use the '{}' as a global replace;
so if the input file happens to be smith.htm, then '{}' would be smith.htm and the idea is that the output filename for the sed command would create a new output file called smith.htm.new.

this of course isn't working.

any help please? thanks.

david
[EMAIL PROTECTED]

_________________________________________________________________
PC Magazines 2007 editors choice for best Web mailaward-winning Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507

Reply via email to