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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I think all here need a wee bit of timeout. If you think you should retalliate please consider not posting in this thread. Not right now at least.
Mods, feel free to delete this bit of advice if you like. I mean it in good spirit and not necessarily directed at the OP, as it addresses a personality flaw that I have:
I've found that there is a very small list of posters that I simply cannot read without feeling strongly moved to make an angry response. This short list of people is now in my ignore list, and I find that I make fewer angry posts, as a result.
I have to agree that I am confused myself on this. First off I think the bash shell has nothing to do with converting windows users. Your average windows users don't even use the windows command prompt and normally run from it at first site.
With that said I agree that bash is great, and the most powerfull thing about linux / unix is its tool box. If I need floating point math then I think yes I will move to perl or C or Java.
I have pretty much read all posts in here in it seems like we are no longer engaging in meaningful information.
However I want to say thanks bigearsbilly, your example was a great at showing why bash is exists in the first place. Hell I learned a couple of new commands from that. I never new that fmt even existed.
At the end of the day what you're saying is "make English
more like Chinese so you can convince more Chinese to
speak English" ... huh?
I agree fully!
Originally Posted by bigearsbilly View Post
i think my statement was valid.
and swearing at people is OK?
Swearing is not OK! Some cultures would not understand
me if I spoke colloquially, (full on aussie),
this is a world-wide community site and it's
important that all may understand what is said and how it
should be interpreted so all may contribute in a positive way.
And it shows your disrespect for yourself, "your ignorance is showing"
I use zsh, and have done for nearly 2 years, bash is still installed and is there if required.
It's just one tool in the toolbox (imo, a really good one).
Get over it, or write your own, you have the tools to do that.
Most M$windows users I know, don't even know what the cmd line is for.
Let alone know what they need it for or why it is there.
CompletelyClueless, you don't make any sense.
Everyone else is right, most people that use Windows don't care about the command-line.
Aside from that fact, the idea of Windows and bash being intimately connected in some way is very strange.
I said it before ... If you have a major problem with bash and think everyone who put effort into it or anything else is an idiot, write your own.
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?
Most of the items in the list of when NOT to use shell scripting are not there because it is impossible to use bash for these purposes. Most items in this list are situations in which shell scripting in general is an unwise choice for various reasons.
As for floating-point or arbitrary precision math, which you mention more than a few times, type-checking of variables, use of complex data structures and the like, zsh can do many of these things in one way or another. If these things are important to you, write your scripts for zsh. There's a reason why bash is not the only shell in any Linux distro. You know . . . different strokes for different folks.
And come on . . . there comes a point where you have to graduate a project up from a shell script to an actual program written in a real programming language. Heck, at least to perl, java, or something else like tcl, all of which do a nice job with the aforementioned items.
Plus, UNIX philosophy has always been to not fix something that isn't broken, and to build new tools to do new things rather than change existing tools to do more. The Bourne shell has long, long been the standard, and I think that bash's approach of extending the Bourne shell as far as is practical while still remaining "just a shell" is a nice fit into the need that was there at the time of bash's writing. At the time there was a lot of ksh, tcsh, and csh use going on . . and that was just ugly. (No offense to lovers of those shells . . .) ksh is fine, but it's not sh.
or, for the other RHCEs in the room . . .
Yes I know. I've just re-read it and don't understand it, either. You'll have to excuse me. It's the heat. I suffer from low sodium levels at the best of times, but at the height of summer it's always worse. Must get some more salt tablets.
bc is a kludge. And an ugly one at that. A unified solution is called for.
Kindly, just some additions/comments, I don't mean to raise the heat here or something, so everyone, take it kindly.
These are just opinion. I don't feel any more sympathy for bash than I feel for any other component of my system. I am not into zealotry. It's just a tool with a very specific purpose, it's a command line interpreter, and nothing else. It doesn't need to fly, it's not designed for 3d quake'ing, it's not a number cruncher. It's gets commands and input and do things with them, period.
You are demanding an unified solution, and now I ask you: do you really think that's the way that linux works? The linux way of doing the things has always been modularization and re-usability of the code. A tool is not supposed to do everything that *you* consider it should do, which of course will be a completely different list of things for each different *you*. When does that modularity needs to end? That's another question that everyone will answer differently. Do we put string mangling in bash or do we move it to awk or sed? To what extent? What about numbers? Choose your answer, everyone else's will be different for sure.
That's why there are lots of different shells, and you can use whatever fits you. One of the purposes why bash is used as the default shell at init and other places is because of its degree of sh-compliance. There are lots, lots, lots of stuff that's written relying on the original bourne shell, and bash can run anything that's written for sh, and in the same way that sh runs it.
If you want to use csh use csh, don't use bash, it's only logical. If bash was C, and fortran was C, and html was C, there would be absolutely no sense in naming them differently because they would be the same language. They are very different, have very different purposes, and tools for different purposes do have different forms, just like scissors and hammers are different, and you will not try to cut a paper with a hammer (well, some people do).
C is a general purpose programming language, bash is a shell language, they both are based on very different paradigms and there's absolutely no point in comparing them. Just like cars and fridges, they serve different purposes, and you can't use a fridge as a car or vice-versa.
If you google a bit you will find that there are a big number of persons that hate csh. I am not into hate, but I really find it unpractical for its purpose, which is interpreting commands. I like C actually, it's my main programming language, but I don't want it on my shell. Others will think differently, and that's why you have ccsh, tcsh, csh and a galore of similar clones, and other shells like dash, ash, ksz, zsh and many more.
Sure that zsh has some interesting features, but when you have 30 shells open you certainly don't need each one of them taking 30 mb of ram just to run commands. Sure that floating point maths would be a nice addition, but not if the complexity of the code is doubled or tripled, and the size of the process is going to double as well. A shell doesn't really need floating point maths for anything, if you need to do a complex operation you usually don't use your fingers to count, you pick an scientific calculator. Make that bc or whatever fits you.
Is bash perfect? no, no piece of software is. If you don't like it you have plenty of shells to choose from, and there's always forking, patching or developing your own, the beauty of OSS.