man sed, perhaps? :D
Hehe, I do understand why that kind of logic doesn't work on scripts, as I'm a script guy myself. The author of regex is a masochist I guess... He and all who understand and use regex... :confused:
Generically, with sed, you have a command and, optionally, a range for it to work on.
So, you can break it down as "/start/,/end/command" which means, once you start seeing a line with start in it, perform command until you get a line with end in it. The command I used is c, which is:
Doesn't tell much I know, but I've seen an example somewhere (for extracting multiple lines data from a file, using !d command).Code:c \
text Replace the selected lines with text, which has each embedded
newline preceded by a backslash.
Oh, and as for the -i option:
Without it, sed will displays the resulting text on standard output, so you can test it first before going "production".Code:-i[suffix], --in-place[=suffix]
edit files in place (makes backup if extension supplied)
Peace always,
<jdenny>
