How to stop a uboot macro using itest was closed as "not about programming or software development"?
Aren't shell programming languages like Bash or in this case U-Boot CLI in the scope of Stack Overflow?
How to stop a uboot macro using itest was closed as "not about programming or software development"?
Aren't shell programming languages like Bash or in this case U-Boot CLI in the scope of Stack Overflow?
First: questions are very rarely actually about a programming language. Maybe if you're wondering about the history of the language's development, or a justification for a design decision the language makes. But those questions are often off-topic because they lack practical value.
Rather, practical programming questions are generally about the task. Therefore, the idea that "questions about X language/technology are inherently on/off topic" is a red herring.
For shell languages, there is a pretty well established principle: if you are using the language to write a script - if you create a .sh
file or type in a function in Bash to use later or edit such functions into a .bashrc
etc. file, so as to record actions to take and perform automation - then you are scripting, and therefore programming, and therefore have a programming question, which is therefore on topic.
If, on the other hand, you are simply using a command line to input commands one at a time, then you do not have a programming question and the question is off topic. In this case you are simply using the computer in an ordinary manner as designed by the operating system authors. Even if such commands are nominally part of a "shell language", you are not actually using them to automate any future process. The question in this case should instead be asked on https://superuser.com, https://apple.stackexchange.com or https://unix.stackexchange.com as appropriate.
Similarly: we do accept questions about using a formula in a spreadsheet, since they're fundamentally about a process that's used to calculate a result, and about creating instructions for that process rather than doing the calculation oneself. We would not accept questions about the UI of a spreadsheet program, since that's simply about using a program used by ordinary computer users, in an ordinary way.
In this case: I have to admit that I've never heard of U-Boot before, and hadn't even considered that a bootloader might be designed to run user scripts. However, there is a tag there with over a thousand questions (and it even has well-received questions from within the last year, so this clearly isn't just an artifact of the attitude towards topicality changing over time); and this question describes an intent to write a "macro" (definitely a programming concept) which implements a multiple-step process using conditional logic expressed in statements; and the clear purpose is to implement some logic which is repeatedly, automatically followed by some other program or tool (i.e., this is clearly an attempt to script it).
So this is definitely a programming question, and I cast the last reopen vote.
Further, since the question is definitely asking about just one step in that multi-step process, and it's a how-to question (rather than asking people to debug code that isn't shown), I can't see another good reason to re-close it.
That said, I think the question would definitely be improved by framing it in terms of a code sample - because it would be more readily obvious that you are trying to write code, and because it would be easier to understand what exactly it is that you're missing. The question claims "I don't know how to create a compound statement in the if/else/endif clause"; but this implies knowing how to create such a clause in the macro language (which in turn implies that this is possible). It would be easier to follow if we saw a code sample which does this, and a description of a problem either with specifying an adequate condition, or with making more than one thing happen when the condition is met, or whatever it is exactly that's the sticking point. (While this was unclear to me, I suspect that has more to do with my unfamiliarity with the system, rather than the explanation.)
cp
, what's stopping me from just saying that this is used inside a .sh file or just put a dummy loop to prove "automation"?
Commented
Mar 17 at 14:31
shutil.copyfile
or Node's fs.copyFile
both would be on topic again, making it somewhat arbitrary that just because a user could directly invoke cp
from the terminal directly it it would be different. I mean, there is definitely a historic difference on how it was originally intended to be used, but that's not really relevant when judging the present day.
Commented
Mar 17 at 19:25
ls .. . | sort | comm -first .g - | randline -n 50 | while read f; do echo "fetching $f"; httpget -O -preserve -sslquiet https://www.rfc-editor.org/rfc/$f; sleep 10; done
interactively at the shell command line — which I did 5 minutes ago, this is not a made-up example — am I "programming", or just using the computer in an ordinary manner as designed by the operating system authors? (You don't have to answer that, but my point is, for Unix shells, the distinction between "using" and "scripting" is super, super blurry.)
Commented
Mar 19 at 0:36