What shell script is wise invest in learning? ksh? bash? sh? csh? help!
Joined: Mar 28, 2001
I know basic shell commands that are common to all of these shells but I want to focus on one before learning the other shells. What should I learn? What shell is widely use in the industry? I've heard ksh has many features and bash, has more interactive scripting functionality. Shelly Shell
Joined: Sep 26, 2000
If you are looking for a shell that is widely in use within the industry I would ask which industry. And different programmers prefer different shells anyway, so I could only tell you which I prefer and why. I have never written shell scripts for a linux box at work - that's not to say that linux isn't used in some industries, I'm sure it is, but in the jobs I've done I have been exposed to HP and Sun versions of unix primarily (also some Motorola unix, SCO unix). And those versions have not generally had a version of the bash shell on them (you can get versions for those platforms but our scripting work was done with the shells provided by default on those platforms). The shell that I think has the best features is the Korn shell (see also the Posix shell). In case a machine you're working on doesn't have either of those available (unlikely in a modern unix) it is always a good idea to be conversant with the ubiquitous Bourne Shell. If you do shell scripting using only Bourne Shell syntax you may not have all the features in the world but at least you can guarantee that it will run anywhere (sh, bash and ksh will run Bourne-style syntax). I hope that helps.