I'm working with a file like:
somestuff
somemorestuff
...
someadditionalstuff
STARTTAG
ENDTAG
someotherstuff
somecoolstuff
...
somefinalstuff
I've got some text (either in a file or piped) to put between STARTTAG and ENDTAG. I was thinking something like grepping for the line number of STARTTAG and ENDTAG and doing appropriate head and tail and so forth, but it'd get ugly by the time I was done. Is there a cleaner/easier way? I know how to do it in Perl, but surely there's an easier/faster/better option.
Thanks!,
BMDan