I am currently writing a Bash script, and I found the exact answer to my programming question here: How can I list files with their absolute path in linux?
Note that the question I used is currently closed as off-topic. I have seen that the debate is that Bash questions belong on SuperUser or Unix/Linux, unless you paste the exact same commands into a
.sh file and run it. (See: Tim Post's answer on Why was my Bash programming question on the `&` symbol closed? for example) This seems pretty illogical to me for the following reasons:
- There is no difference between bash scripting and bash typing other than the time period in which you type the commands (ahead-of-time or real-time as you need them).
- The question is exactly the same whether you're typing it out in real time or typing it into a Bash script. In fact, many Bash programmers will try individual commands live on the command line to make sure they work properly before pasting them into the script. Literally the exact same question could be made "on-topic" on SO by just pre-pending this sentence to the question: "I'm currently writing a Bash script and...". In other words, it isn't the question that we care about it, it is the context, when the context doesn't change either the question or the answer? What if future programmers writing a Bash script have the same question but never see it because they don't want to search 4 different sites for where some random mod thinks it is most on-topic (there can be arguments made that Bash questions belong on SO, SuperUser, Unix&Linux, and AskUbuntu. What if I'm typing my Bash commands in real-time (so not into a script) on an Ubuntu machine...)? Major dilemma...
- Bash is a very commonly used programming tool. For many of the programmers I work with, Bash/Vim or Bash/Emacs is their IDE. SO is a site for programmers.
- People tend to post questions/seek answers on whichever site they are most familiar with. So, if someone isn't a programmer, but writes Bash scripts as part of their system administrator job, their questions would naturally be more related to SuperUser or Unix/Linux. On the other hand, people writing Bash scripts for programming purposes tend to look here on SO. This is a natural sorting algorithm that helps address the problem of many legitimate overlapping jurisdictions.
Can we not be so quick to throw away excellent questions that benefit a lot of people (as evidenced by the high vote counts and comments expressing frustration and outrage at their closure), and instead focus our efforts on generating awesome content and bouncing the questions that clearly need to go (such as the "Do you haz teh codez")?