I want to remove all the text between (and including) two strings in all the files in a directory. For an example, the files look something like this:
flag
bla bla bal
bla bla bla
endflag
etc..
This is what I'm doing with sed:
sed -i "s:flag.*endflag::m" *
However, the 'm' option is not part of sed. All the other Stack Overflow threads on this topic resort to using perl, awk, or a sed wrapper to accomplish this. Isn't there a way to tell sed to match newline characters?