A few of us were discussing the fact that information on the various shell operators is spread across multiple Q&As. For example:

And many others. The basic question in each case is how a particular shell operator works. So, I decided to write a canonical Q&A giving a brief explanation of what the different operators do. The idea was that we can then close the various other questions as duplicates of the canonical one:

What are the shell's control and redirection operators?

My hope was that my answer would be general enough to serve as an answer to all of the above questions and also to the future ones. That it would act as a global target against which we can close any question about how shell operators work (at least with respect to bash).

I should also point out that I had not made my answer into a community wiki post which might have given the impression that I was after the reputation points. I have now made it a CW answer, something I should have done in the first place, so that should no longer be a concern.

However, today, I closed a question as a duplicate of mine and two users felt that I was overstepping my bounds as a moderator. I am therefore bringing this up here. Should we close those other questions as a duplicate of mine or should we instead choose one of the existing ones, broaden it and I should repost my answer there? What do you think is the best way of dealing with similar cases in the future?

Relevant discussions:


Unilaterally closing a question as a duplicate of one you asked and answered yourself is a bit iffy. Doing it after a discussion in chat is perfectly fine. I agree with your judgement that it is a duplicate. Posting a new question was warranted because the original question focused on a special case and it makes sense to have a more general canonical question.


Should we close those other questions as a duplicate of mine or should we instead choose one of the existing ones, broaden it and I should repost my answer there?

IMHO, close others as a dupe of yours. Broadening existing questions risks rendering many answers irrelevant.

What do you think is the best way of dealing with similar cases in the future?

If there are several questions on closely-related issues that could be served with a slightly more-general question, sure, make a more general question, answer it well and close-dupe the others. Questions have been closed as duplicates of newer ones before, so the age is not as big an issue.

This specific instance seems well-served by your question - a quick reference answer on common separators.

Lastly, as you're moderator, I hope you will refrain from closing the others as dupes for some time (say a week), to see others' takes on your question. Or perhaps you could flag as a dupe and not close it directly. Questions which ask about some nuance of the operators would, of course, be left alone.

  • 2
    You're quite right, I should have waited. That was my initial reaction actually and I only stepped in to close the one I closed because someone had voted to close mine as a duplicate of it instead. I still should have let someone else deal with it though. – terdon Oct 6 '14 at 20:24

I am not commenting on whether the original question should be closed or left open. But I am a strong supporter of canonical question/answers for our community.

It is worth noting that if a question gets 1k views in 2 days, it obviously means that the question has a much more wider audience and a good reach. So, in this context, if it attracts more views, then it is a good idea to have a more detailed question which answers from a much more broader perspective and explain things in detail. So I definitely appreciate the effort to put in a canonical question/answer to address a much more broader problem.

Personally I feel these sort of things are what make ours a wonderful community.

For instance, we do have a question on renaming which is also present in our canonical list. However, we still got a newer question asking the same. This will be repeated in future as well where people will be asking about the things that are present in the canonical list. But, these canonical questions can help the OP in doing a research and mention it in the original question. If such an effort is made from the OP side, then I would say the compilation of canonical questions/answers is definitely a success.

The community is by far the best SE community and let's work together in making it a more awesome one.

  • 3
    We don't have a canonical question on renaming. We should. That old question isn't a canonical one, it just focuses on the asker's problem. I'm sure we have better ones (with fewer votes because they aren't as old). – Gilles Oct 7 '14 at 7:35
  • @Gilles, yeah. But just to mention an example I took up that case. – Ramesh Oct 7 '14 at 13:56

I have no problem with closing duplicates; the more vigorously it is done now, the better the long term prospects of the wiki in maintaining the interest of the community that has coalesced around it. Anyone really want to see another bulk rename question?

With respect to actions characterised as "unilateral"; the simplest and most transparent approach is for moderators or gold badge privilege holders is to quite scrupulously manage any conflict of interest, or the perception thereof.

If it looks like you stand to gain some real or imaginary benefit from the closure, leave it. We have enough moderators now to be able to have them hand off tasks to one another to ensure that the administration of the site is seen to be fair and just, and that all is right with the world (for now)1.

1. Don't make us head to the barn for the pitchforks...

  • 1
    It's a bit like Lex Luthor stepped in... – mikeserv Oct 6 '14 at 22:29
  • 3
    @mikeserv "Luthor is a wealthy, power-mad business magnate of high intelligence and incredible technological prowess." I'll own it... – jasonwryan Oct 6 '14 at 22:33
  • It was far from derogatory - and, considering the answer, I figured the author would be pragmatic enough to see the very intentional compliment there. But by the way, I never liked Superman anyway - my favorite Superman comics were the ones in which Batman handed it to him. – mikeserv Oct 6 '14 at 22:37
  • @mikeserv Well, I did (happily) embrace it... – jasonwryan Oct 6 '14 at 22:40
  • That's a compliment, Superman is so blah.... – slm Oct 6 '14 at 23:43
  • 7
    @slm Underpants on the outside, 'nuff said... – jasonwryan Oct 6 '14 at 23:48

While I do think there should be canonical questions about the shell operators, I feel it should not be only one question.

The problem I see it that one of the great effects of this platform would not work well for one combined question: The refinement of the answers. The combined answer like it exists currently is a couple of pages long, consisting of two answers.
It already starts to be hard to read and navigate.

Each type of operator is described, in a detailed and complete way.
But that's not all there is to the operator - there are relevant and interesting context informations for probably each of them;

Not something one would write down in a go, but perfectly suited to be collected over time.
Examples would be common usage patterns, antipatterns and pitfalls. And often some uncommon, but useful usage patterns.

Now, my point is, if one would even start to add relevant details or context to the operators, the answer would get unusably messy and hard to navigate.

For example, if I would add a description of how to use && and || to chain commands with error handling with examples, that would go into a new answer. Editing the original answer to add it to the && section is not an option, because it would badly degrade the structure of the text. As result, there is an answer that refers to a small section of another answer. Also, answers would be refering to different topics, so the voting can not create a meaningful order.

If there were canonical answers for each group of operators, these problems would be solved: the question can introduce the operator, like "What is the && in these command examples?" The first answer gives the basic explanation. Related information can get added as further answers, and get voted on in a meaningful way.

Also, the questions should be suitable as duplicate targets

This approach can be combined with a central question with references to the individual ones in various ways, differing in the amount of information kept in the central question.
I would propose that the central question gives an overview introducting the types of operators, and describing relations.

If there is a central duplicate target is needed, the central question should still work.

Again, the motivation is to allow for long term refinement of answers, which I assume will not work with a single central question.

  • 1
    I agree about not making them too long. On the other hand, the ideal canonical question is a community effort, improved by many users. However, my idea for this one was a kind of short cheat sheet. Not an all inclusive answer. I was targeting newbies who don't know what > or & do and wanted to give a short explanation of each. Questions asking about more in-depth aspects of the various operators would not be dupes of that. However, ones asking the difference between &, ; and && would be. – terdon Oct 8 '14 at 17:00
  • 1
    @terdon Re "Questions asking about more in-depth aspects [...] not be dupes of that.": So if I would find, or create individual questions on details of the operator types, and link them somehow from the central question, it would be not that different from what I described. Sounds good. – Volker Siegel Oct 8 '14 at 19:19
  • That would be great. Linking to other answers on the site for the specifics would be absolutely perfect! – terdon Oct 8 '14 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .