Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 .
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.
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.
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.
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++
But that's the whole point of scripting languages, and the Unix
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.
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).
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).
bc is a kludge. And an ugly one at that. A unified solution is called for.
I knew I'd set the cat among the pigeons with this post, but it nevertheless demands some serious answers!!
I disagree that such a (deliberately!) provocative question deserves any kind of serious answer.
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.
I disagree that such a (deliberately!) provocative question deserves any kind of serious answer.
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?")
That's not what I asked. Sadly, Bash has MANY more deficiencies than merely the inability to support floating-point arithmetic.
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.
That's not what I asked. Sadly, Bash has MANY more deficiencies than merely the inability to support floating-point arithmetic.
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.
Heh. It's just a matter of paradigms. Most of us here (seemingly)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.