Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!algor2!jeffrey From: jeffrey@algor2.UUCP (Jeffrey Kegler) Newsgroups: comp.unix.questions Subject: Re: Which shell language should I use? Summary: sh and ksh Message-ID: <423@algor2.UUCP> Date: 5 May 89 22:50:45 GMT References: <113700004@uxa.cso.uiuc.edu> <1917@ssc.UUCP> <1540@auspex.auspex.com> Reply-To: jeffrey@algor2.UUCP (Jeffrey Kegler) Organization: Algorists, Inc., Reston VA Lines: 29 First, every UNIX programmer should know how to use plain old sh (and ed, for that matter). Every once in a while you have no other choice. So if you do not know sh, that is the one to learn first. Which should be your shell of preference is more a matter of taste. Before the Korn shell came along, I was a big user of csh. The major problem with csh is that it is not Bourne shell (that is, sh) compatible. I wind up moving around a lot and changed shell syntax has gotten to be too much trouble for me. Now I never bother with csh any more, and use the Korn shell if I have it, the Bourne shell if I do not. One of the main reasons I stopped using csh is the issue of shell scripts. If you desire portability, it is risky to write a shell script in anything but the Bourne shell. Also, for heavy duty shell programming, the Bourne and Korn shells are better than csh. Not to go into details, but redirection of input and output from while and for constructs in very useful, and not available in csh. To summarize: 1.) If you do not know the Bourne shell, sh, learn it before doing anything else. 2.) Pick an interactive shell of preference. If you are reasonably sane, it will be ksh or csh. I prefer ksh. 3.) Always write shell scripts in sh. -- Jeffrey Kegler, President, Algorists, jeffrey@algor2.UU.NET or uunet!algor2!jeffrey 1762 Wainwright DR, Reston VA 22090