Is Bash crap?
Isn't the Bash shell a bit agricultural? I mean, does it not in truth resemble a 1950s Russian tractor? I mean it can't do floating-point math nor a whole bunch of other stuff.
Somewhere someone posted a link to a guide to advanced Bash scripting and it started out by stating what Bash is NOT suitable for. This heading was followed by a *VERY* long list of situations indeed, most of which the remedy for was using C/C++ or Fortran or some other more complete language instead. Shouldn't we all just be writing our scripts in C/C++ and using the tcshell instead? |
Bash is used for many things, but it's not used for everything, that's all ... read up on init scripts, and look at yours. Sometimes bash is used for other important things :D.
If you want to replace every bash script on your system with another language, you're welcome to. I don't see anyone else moving in that direction. |
How dare you bash bash?!?! :tisk: :D
|
Quote:
I knew I'd set the cat among the pigeons with this post, but it nevertheless demands some serious answers!! |
No matter how little I know about things, I know enough to know that many other people (all highly intelligent) are also thinking hard about the same things.
|
Bash is a good shell...but I'm a ksh script writer :)
I may be just "splitting hairs" but I like scripting in ksh :D |
I haven't got round to trying the other shells, tcsh, pdksh, and zsh. I'd have to do that before I could criticise bash. If it's used as the default shell on so many distros, it can't be all that bad really.
|
Quote:
Linux philosophy; many little tools that do one job, and do it well. You certainly could go and write & compile your init scripts in C/C++, but do you want to have the tool chain to build them installed on all your servers? bash (with a little help from bc) will do the job (maybe a tick slower than a C++ generated executable would have), but then, you don't boot the server often enough to make that performance benefit worth the while. Just because it doesn't do everything for you in its own right doesn't make it useless. It's still the glue yo can use to get all the tools in your system to work together. Quote:
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Cheers, Tink |
Keeping in mind that part of the principle of Unix is to have many little things do one thing well, I think it more than serves its purpose. For example, to do floating point math you could combine bc with bash. (Or use python, perl, or even zsh actually).
|
Quote:
|
Hi -
Quote:
However, if you asked the question a bit more politely (like "Gee: why would I want to use 'bash', even though it doesn't support floating point?"), perhaps somebody might have responded with a long list of problems for which bash is the *ideal* solution. IMHO .. PSM |
"Bash is a Russian tractor", "bc is a kludge". What next?
|
Quote:
Quote:
Go and code in C++ - you have the freedom. Cheers, Tink |
Quote:
Please, everyone, get over your blind loyalty and examine the question dispassionately. This is something that could really make a positive difference if actually addressed. |
Quote:
prefer the lego method, whereas you want a ready-made remote control car. You preference for the latter doesn't make the first bad; it just means it's not what you want. Get over it. Stop telling everyone else they have bad taste in toys. Cheers, Tink P.S.: And with these words I'm moving the flame-bait to General, where it belongs. |
All times are GMT -5. The time now is 04:01 AM. |