This isn't a site for asking programming questions. It's well understood that pure programming questions should be moved to stackoverflow.com.

There does seem to be an exception for bash, even where those questions are purely about bash (eg: bash syntax) and not the *nix shell at large (eg: interaction between other commands).

When asking questions, it's clear enough that questions about grep, awk, sed are accepted as appropriate on unix.stackexchange.com. I'd personally vote-off-topic any pure python or C question if they weren't about interaction with the wider OS. But I wouldn't be so sure about perl or expect.

Then when giving answers I'm even less certain. For example I see occasional how-to questions which (IMO) are ridiculously complex in bash, awk, sed, etc. but trivial in python, (<10 lines, no non-standard libraries). On such questions I wait and see if other answers are forthcoming. But if they get no answers, I'm not sure if I should give my 10 lines of python or not.

Is there any list of which languages / tools we should stick to when offering answers. And, if bash questions are on topic, which other languages should we regard as on-topic?

This isn't a site for asking programming questions. Yet we have made exceptions for a (fuzzy?) set of programming languages. See scope page:

If your question is a programming question, requiring knowledge of programming languages other than unix shell scripting languages, ask on Stack Overflow.

Even our scope page implies these are programming questions (which they are). In practice I don't know a competent Linux user who doesn't know a little programming. And specifically shell scripting is largely mandatory for all but the casual user.

Where this starts to come unstuck is with tags like , where there are many questions asking how to perform some programming task "in a shell script". I don't think this was the intended purpose of including shell-script-programming questions in our scope. This doesn't feel in keeping with the purpose of the site. It seems to have wedged open our scope further. Yet I see no easy fix.

My purpose for asking the question was to flag that (I feel) stuck between three options:

  1. Acknowledge programmer questions for what they are and vote to close / migrate them even if they were about shell scripting.
  2. Acknowledge programmer questions for what they are and wede the scope further by offering a programmer's answer. One written in a proper programming language. Trollish tone NOT intended.
  3. Write an answer that's not as good as I'd give a colleague, but is written in bash, awk, sed...
| |
  • 1
    Thought: does the mere presence of a language make a question a programming question? (And, symmetrically, an answer an inappropriate answer?) Asking "which languages" may suggest it does (or at least can do), and that questions about shell scripting/language are on-topic just because the scope of U&L explicitly includes shell scripting. My feeling is that two dimensions have to be considered: how close the question is to "Using or administering a *nix [system]" and how much programming competence is reuquired, regardless of the language(s). – fra-san Jul 30 at 15:24
  • 1
    I've always believed programming questions centred on *nix system calls are on topic here, as long as the focus is on the OS behaviour. That is discussing OS behaviour with regard to almost everything in man 2 ... is likely to be viewed as on-topic. But it's much harder to write a question based on something in man 3 ... and remain on-topic. – Philip Couling Jul 30 at 15:37
  • The question is clearly about answering, so why remove that from the title? – muru Aug 2 at 7:24
  • @muru please re-read. It's about BOTH asking and answering. This was highlighted by Stephen Kitt in his answer. See his edits: unix.meta.stackexchange.com/posts/5625/revisions – Philip Couling Aug 2 at 8:09
  • @PhilipCouling what of the edit? The edited portion still says "the scope of answers". Why, then, do you say "When asking questions, it's clear enough...", "Then when giving answers I'm even less certain", "Is there any list of which languages / tools we should stick to when offering answers" (which in particular is what my edit of the title restated), all of which don't match up with your later edits? It just seems you're muddling the topic; perhaps you should clear up what exactly is in your mind, and re-edit the whole post to clear up the muddle. – muru Aug 2 at 8:20
  • 2
    @muru You've rather taken my words out of context there. "When asking questions it' clear enough that <some clear stuff>" was immediately followed by "But I wouldn't be so sure about perl or expect.". Then "tools we should stick to when offering answers" was immediately followed by "And, if bash questions are on topic, which other languages should we regard as on-topic". When an OP rejects your edit, please do not edit it back in! Both answers addressed the scope with regard to questions. I, the OP, must be allowed to choose the way I frame my own quesiton! – Philip Couling Aug 2 at 11:57
  • 1
    "When an OP rejects your edit, please do not edit it back in!" Correspondingly, when a user repeatedly does try to edit, understand that something in your framing isn't working right, and you should reconsider it. – muru Aug 3 at 1:14
  • @muru I honestly don't know what you find unclear about this question. I think you initially misread. I edited out your title change because it wasn't what I'd intended and it misled others. I edited in two more sections to clarify. The last section makes it as clear as I can: A single question provokes 1 of 3 responses (not necessarily answers). To chose between them I need to understand acceptable scope of both question and answers. Yes this topic is a muddy one, that's why I'm asking! I want others to help me clarify the unclear! – Philip Couling Aug 3 at 8:28
  • It is hard to think that "This isn't a site for asking programming questions. It's well understood that pure programming questions should be moved to stackoverflow.com." is unclear. If a question is about solving something particularly in a *nix domain, why would anyone care what language is used to ask or answer a question that isn't about the language itself? The only fuzziness I can see about what is on/off topic is that questions about the language itself are apparently allowed if the language is a *nix scripting language, and, that that fuzziness is increased by WSL / MSYS, etc. – kbulgrien Aug 4 at 15:49

Addressing specifically the scope of answers, I note that the scope of the site is defined in terms of questions, it doesn’t limit answers.

So when answering, I would say that anything that’s helpful to answer the question is fine. I’ve written quite a few C programs to answer questions here, and in some cases I’ve even explained the process. If you have a better solution to a text-processing problem (or any other question) in Python, R, etc. than existing answers using shell or AWK, that solution certainly has its place here in my opinion.

If you want to phrase this in terms of scope compared to Stack Overflow, I’d consider things as follows:

  • questions about how to write a program to do something are a better fit Stack Overflow (except when the question author specifically asks about a language which is accepted here);
  • questions about how to do something on a Unix-like system are fine here.

Questions about the system’s behaviour are also fine here, and they can often involve digging into source code, often in C.

Remember that Unix’s forte (or not, depending on your point of view) has always been that it’s a self-hosted operating system designed to make it easy to develop itself, and the result is (still) that advanced system administration often ends up being programming in one way or another. In such a context, exposure to better tools and techniques is good for everyone.

(Looking at it from another angle, I often think it would be helpful to write more GUI-based answers, but it’s a lot more effort than copy-pasting commands...)

| |
  • 2
    Looking from sustainability angle, I often think it would be helpful to stick with more CLI-based answers – Tim Jul 31 at 22:13
  • 1
    I guess "questions about how to do something on a Unix-like system" include those about using compilers, interpreters, and tool chains for various programming languages on Unix-like systems. – Tim Jul 31 at 22:17
  • @Tim I'd be cautious with that. By default such questions should be on stackoverflow unless the specific tool or specific problem are related to using it on *nix. – Philip Couling Aug 2 at 19:11

Stack Exchange does not divide up by topic, it divides up by readership. This is something that people stumble over, but if you look at all of the site descriptions in the drop-down list of "Stack Exchange communities" at the top of this very page you'll see that all of the communities are described in terms of the people that read and write the questions and answers, not in terms of the subject matters.

It takes a while to spot this, especially if one has a background in the likes of CompuServe, Fidonet, Usenet, I-Link, and so forth, which did divide up by topic, and whose FAQ documents did as well. But it is how things are structured by the company that runs the sites, and is the methodology that one can see all the way back to 2009 (where the question was "Which community do you consider yourself a part of?") if one goes and looks.

This WWW site is "for users" of Unices and Linux-based operating systems. Stack Overflow is "for programmers".

So the correct approach is to consider the readership.

If an answer is aimed at a user of the operating system, then it is appropriate. It seems to be surely the case that one-liners in many of the interpreted languages that one can commonly (and even as standard in some cases) find on Unices and Linux-based operating systems, are usable by users. Conversely, a question or an answer that is for programmers is better on Stack Overflow.

I for one would object to any notion that everything outwith grep, sed, and awk was outwith the scope of using these operating systems. It is both narrowminded and blinkered, and definitely not in accord with my experience as a user. Indeed, a lot of the history of Unices has been the expansion to include all sorts of useful tools that users can employ, from perl through rs and jq to Miller. This is, moreover, a process that is ongoing today.

So your question is ill-founded to an extent. It is not the case that there is a set of on-topic and off-topic programming languages. It is, rather, whether a question and an answer is appropriate for a readership of users.

There is an observable widespread tendency to give an awk answer to almost everything, but that should not be inferred as a rule to be followed, and if there's (say) a Python answer that involves less programming then surely that is quite on point as an answer for a readership of users.

I went against the grain, applying other tools that people have written over the years to directly perform the job at hand which do not involve entering a program for awk or a shell to run, with answers like https://unix.stackexchange.com/a/574309/5132 and https://unix.stackexchange.com/a/578242/5132 . Others have done similar. https://unix.stackexchange.com/a/584274/5132 and https://unix.stackexchange.com/a/569600/5132 are (for examples) answers that show alternative tools to answers employing shell script and (yet again) awk programs, namely John A. Kunze's jot and rs (reshape), which have been around since 4.2BSD for goodness' sake!

Similarly, it's not about which section number a library function has assigned to it. It's about whether the Q&A is for programmers or for users. Knowing that there's wacky semantics to the (Linux) settimeofday() system call that make the system time jump around at bootstrap is something that concerns users, especially when it affects things like filesystem checks (c.f. https://unix.stackexchange.com/a/600490/5132). But whether one can pass a time_t to settimeofday() is a question for programmers (c.f. https://stackoverflow.com/q/3374659/340790). It's the same system call, but two different readerships.

| |
  • I would certainly change "user" to "user or administrator", but not to "programmer", no. – terdon Jul 31 at 8:17
  • 2
    "Stack Exchange divides up by readership"... well, yeah, maybe. But the title on that help page is "What topics can I ask about here?" – ilkkachu Aug 1 at 9:28
  • All of which merely demonstrates that it hasn't sunk in for M. Couling and ikkachu yet. It took a while for the penny to drop for me, too, and as I said it's the thing that people stumble over. But it has been the case all along, and is in fact the reason for seeming-oddities like the overlap with AskDifferent and AskUbuntu, and why there are three mathematics, two English language, and two computer science sites. – JdeBP Aug 1 at 10:14
  • Speaking of topics, it is the interdisciplinary nature of multiple stackexchange sites that needs more recognition. Speaking of readership, related sites don't necessarily have the same audience, which is up to personal browsing habit. All of which merely demonstrates that cross posting should be allowed. – Tim Aug 1 at 12:38
  • Wait, what is the third mathematics site? On the same vein, isn't it that there are three computer science sites? – Tim Aug 1 at 12:41
  • 2
    @JdeBP, erh, I don't believe the way the site is documented in any way reflects what has "sunk in" for me (though the opposite might apply). I was only pointing out that what you're saying is not exactly clear from what SE itself presents. Also, my name is Ilkka, and my username is ilkkachu, and I'll thank you to use that username. (I'm sure you know you can just type @ and the first letter and then hit tab to autocomplete it. Works at least on a desktop browser, maybe not on a phone.) – ilkkachu Aug 3 at 13:17
  • 2
    Saying that "it hasn't sunk in" is needlessly personal. I fully understand your point. I think it's wrong. You edited to reference this page. Quoting from that page (emphasis theirs not mine): "The whole point of these sites is to form a community around specific topics.". I think that actually says the opposite of what you want. It says the sites are divided by topic first, and the readership forms around it. – Philip Couling Aug 3 at 16:32
  • 1
    Frankly, this answer seems to present the most useful non-obvious points given that (at this time) the other answers by Stephen Kitt and peterh appear largely self-evident based on a reading of the scope page. – kbulgrien Aug 4 at 15:53

This is a site for Unix/Linux questions.

If they are about programming, then so is it. The requirement is that it has to be Unix/Linux related. There is no requirement about any language/platform, but also none of them is forbidden.

Simple script languages identified commonly with the Unix world (bash, awk, sed, etc) are imho per definitionem on-topic.

Also per definitionem on-topic if a question is about a Posix APIs (or the system APIs provided by any Unix-related system). These questions are most likely asked in C, but it does not make any specific privilege to the C language.

However, the most common programming questions asked on the StackOverflow are today all in highly platform-independent languages: Java, Javascript, Python. These questions are obviously off-topic, except if they are very clearly about some Unix/Linux-specific thing (for example, OP wants to distribute signals to a multi-threaded python process). This happens very rarely, because the practical problems happening about them are mostly not relate to any OS et al. Thus, these questions are very rare here.

| |

You must log in to answer this question.

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