Dave selby <[EMAIL PROTECTED]> [2003:10:04:19:25:32+0100] scribed:
> I have multiple html files. I need to remove the same chunk of code from 
> all of them.
> I have made a bash loop to feed the files to sed, but am struggling with 
> the sed code.
> 
> I need to delete all the code between
> 
> <!-- lockon:a:1
> -->
> 
> and
> 
> <!-- lockoff
> -->
> 
> Including the above comments.

Do you want to specify a range like this:

   sed '/<!-- lockon:a:1/,/<!-- lockoff/d' /tmp/tmp.txt

hth

-- 
Best Regards,

mds
mds resource
877.596.8237
-
Dare to fix things before they break . . .
-
Our capacity for understanding is inversely proportional to how much
we think we know.  The more I know, the more I know I don't know . . .
--

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to