Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!news.cs.indiana.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!jbn35564 From: jbn35564@uxa.cso.uiuc.edu (J.B. Nicholson) Newsgroups: comp.unix.shell Subject: Re: shells? Message-ID: <1991Apr16.050922.22662@ux1.cso.uiuc.edu> Date: 16 Apr 91 05:09:22 GMT References: <1455@irit.irit.fr> Sender: usenet@ux1.cso.uiuc.edu (News) Reply-To: jeffo@uiuc.edu Organization: University of Illinois at Urbana Lines: 53 In <1455@irit.irit.fr> pfeiffer@irit.fr (Daniel Pfeiffer) writes: >I don't need a history or a command line editor, GNU Emacs does that >better than any shell will ever be able to! Have you tried emacs mode in KSH? I'm not familiar with Emacs (GNU or otherwise), but I find that emacs mode in KSH is great. >Does some shell just provide improvements over Bourne shell. Given >the amount of code that exists for Bourne shell this should be upwards >compatible. For example I heard that [ test ] is a built in for ksh. >Does that mean we have we can say (without ;): > >if [ test ] then >while [ test ] do Actually, I think what you say in KSH is: (the preferred notation) if [[ expression_to_be_run ]] then while [[ expression_to_be_run ]] then The 'test' notation and the [ notation (according to the KSH book) have been made obsolete by the [[ ]] notation. >The only things I miss in Bourne shell is a list type or something >like that, so I can get at ${27} or ${$#} for command line args, and >for similar but separate structures of my own. And it would be nice >if it could do some clever redirection for builtins and functions in >pipelines, rather than fork off a subshell for each one. Then we >wouldn't have to bend over backwards to set variables, cd and other >things. Sounds like KSH is for you! You can do all that, but ${$#} is the PID of the command, and not the number of arguments to the command ($# is this). I recommend you get the KSH and the book by Morris I. Bolsky and David G. Korn called the "The Kornshell Command and Programming Language" (ISBN 0-13-516972-0). It's a great book and even though I've only had my copy for about 3 weeks, I've already gained a world of knowledge from it. >-- >-- Daniel Pfeiffer >-- Tolosa (Toulouse), Midi-Pyrenees, Europe >-- "Beware - polyglot esperantist" >-- Jeff -- +----------------------------------------------------------------------------+ | "If you hear an onion ring - answer it." J.B. Nicholson | +----------------------------------------------------------------------------+ | jeffo@uiuc.edu (Internet) These opinions are mine, that's all.| +----------------------------------------------------------------------------+