I want to write a script that finds a open/close tag pair in a text file and prepends a fixed string to each line between the pair. I figure I use grep to find the tag line numbers and either awk or sed to place the tags, however, I'm not sure how exactly to do it.
Can someone help?
;tag; <text> ;tag;
then my program will go through and prependtag
to every line of<text>
. I'm working on a note taking tool using markdown, but it's a pain to manually put a>
on every line, or even> >
:-p