What I want to do:
I wish to create a question:
Title: Print all lines between two patterns, inclusive (in sed, AWK or Perl)
Question: it'll look much like this one, but ask about the inclusive, rather than exclusive, case.
Why am I asking here?
Because when I created that question above it caused a massive controversy.
What is the problem I am trying to solve:
As with the other question, I found it way too hard to find an answer to this trivial, extremely common, sed/AWK question. Type in search terms, "sed print lines between two patterns inclusive" and you may see what I mean. Part of the problem is there are so many similar hits, as a result of so many badly asked and badly worded questions, that it's hard to find the actual answer. And for people like me who prefer to find answers on Stack Overflow, I wasted some time.
(Frankly, at this time, Stack Overflow is a very poor resource for finding one-liners in sed/AWK. We could make it way better with some cleanup.)
Has the question been asked before:
I would argue, no. The answer is at Stack Overflow, but it's underneath a different question, i.e.:
That answer isn't an actual answer to the question asked at that link. So I didn't, and probably wouldn't next time, notice it there. The question there, despite 31 upvotes, is also not great, i.e. no examples of expected outputs.
A whole lot of similar questions exist, but AFAICT, not this exact question.
What is the answer I want to document:
sed -n '/PATTERN1/,/PATTERN2/p'
I found it here, admittedly the second highest ranked post on Google. I didn't go there, initially, however, because in my experience, people's blog posts on sed/AWK tend to be badly organised and are lists of their own personal favourite one-liners, and it takes a lot of time to find the one you're after.
What do I want out of Meta today?
I am happy with any answer, if that's the consensus. Simply doing nothing is fine for me. I solved the problem, and I can write my own blog post on "favourite sed one-liners" if making them easier to find at Stack Overflow is frowned upon.
Note about duplicate question marker. At this time, 3 people have voted to close in favour of duplicate of this. The answers there, however, are not highly-upvoted, none are accepted, and the leading answer is negative, cynical and defeatist, and there's no evidence of any obvious consensus. Is close-voting here another way of saying, "Just do whatever you want, we don't care?" Or failing that, at least add some comment on how close-voting is supposed to be interpreted. As I noted, if someone could tell me: Is there a Bash chatroom? That would also be good answer.