Wikipedia:Reference desk/Archives/Computing/2023 June 26

= June 26 =

Apache virtual host creation automation
This is my current approach, in Bash language, to create Apache virtual host files:

The only programming languages I have elementary knowledge with are Bash and JavaScript.

Would you do it othewise? With another shell?

Would you install COBOL or Python or Node.JS or anything else (or just use PERL) to build the script with?

Thanks. 2A10:8012:11:A87A:646D:9BA4:51C7:BE1F (talk) 19:24, 26 June 2023 (UTC)


 * There is no reason to NOT use a Bash script. It is becoming common in Linux for the new kids to prefer Python to the point that many don't even comprehend Bash. But, look at it this way - you are running a Bash interpretter. So, if you run a shell script, everything is loaded and running. If you use Python, you have to load the Python interpretter. Then, what if your script works in Python 2 and you have Python 3 loaded? Conflict. When it comes down to it, you could write your script in any language, but if you know Bash, why not stick with it because you are essentially just executing Bash commands even if you execute them from Python or COBOL or PHP or C++ or ADA or ... 12.116.29.106 (talk) 13:22, 27 June 2023 (UTC)
 * If the same commands would be inside a traditional programming language document then yea, I'll just stick to Bash I guess. I do wonder if using another shell like ksh or zsh would end in a more "COBOL-like" wordy-humany syntax... I just never worked with ksh or zsh. Primarily just curiosity. 2A10:8012:11:A87A:29BB:E6CF:D96F:37DC (talk) 13:49, 27 June 2023 (UTC)


 * There are importand differences between compiled and interpreted languages, and some that are a half-way case. See Interpreter (computing) for a fuller description.  Of the languages you mention COBOL, C++ and ADA are all compiled and will generally run an order of magnitude of more faster. Martin of Sheffield (talk) 13:48, 27 June 2023 (UTC)