Michael D Schleif <[EMAIL PROTECTED]> [2003:10:04:16:32:37-0500] scribed:Many thanks, it works great ... just playing with it to get how it works !
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.Do you want to specify a range like this:
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.
sed '/<!-- lockon:a:1/,/<!-- lockoff/d' /tmp/tmp.txt
Oops! I forgot about the closing the lockoff comment:
# sed -f /tmp/tmp.sed /tmp/tmp.txt
# cat /tmp/tmp.sed /<!-- lockon:a:1/,/<!-- lockoff/{
N
/-->/d
D
}
Dave
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]