Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!sundc!texsun!convex!convex.COM From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.shell Subject: Re: csh, ksh, or sh? Message-ID: <110254@convex.convex.com> Date: 11 Dec 90 00:16:04 GMT References: <1990Dec10.013209.29955@cs.ucla.edu> <1990Dec10.193740.19406@ux1.cso.uiuc.edu> Sender: news@convex.com Reply-To: tchrist@convex.COM (Tom Christiansen) Distribution: comp.unix.programmer,comp.unix Organization: CONVEX Software Development, Richardson, TX Lines: 46 In article <1990Dec10.193740.19406@ux1.cso.uiuc.edu> carroll@cs.uiuc.edu (Alan M. Carroll) writes: >> >The ksh is far and above the best shell of these three. >This is certainly my opinion. I've extensively customized my Korn >Shell environment, and developed small and medium sized applications >in Korn Shell. It is the best as a shell, and as a programming >language. Well, there's some debate about whether you want to use a shell as a programming language for anything more than very simple command scripts. For small applications, maybe in some cases it's ok; certainly ksh is better at this than csh, which is a joke for programming. For medium-sized tasks, and some kinds of small ones too, I'll take perl over any mere command shell any day. You will find that tcsh offers some nice features that ksh lacks, including asynch notification of change in job status (even csh gives you that), spelling correction, and expression history (again, csh does that too), curly brace expansion (csh has this) and rebinding of editing keys and quite a bit of other fluff. Ksh does have a more realistic vi mode than tcsh. The bash shell from GNU tries to address many of the problems that ksh has, being somewhat the logical and aesthetically pleasing union of ksh and tcsh. It does use sh syntax, not csh; this is by many considered a feature. When I tried it a year ago, it was still a bit buggy, but a lot of work has been done on it since then. It's also free, unlike any of the aforementioned shells (tcsh diffs to csh are free, but csh itself is not.) In summary, you don't really ever want sh or csh for much of anything. For interactive work, I'd look at ksh and tcsh, or better yet bash. For programming, sh actually is more portable than the others, but you can do very little of any complexity (without pain and suffering) if you limit yourself to its capabilities. If you want much more complexity than sh gives you, abandon shells all together and look at perl. This is, of course, merely my own opinion; you should try to form your own. It's certainly taken me many years to form mine; you deserve the same chance. --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "With a kernel dive, all things are possible, but it sure makes it hard to look at yourself in the mirror the next morning." -me