View Single Post
  #8   (View Single Post)  
Old 14th March 2014
thirdm thirdm is offline
Spam Deminer
 
Join Date: May 2009
Posts: 248
Default

Quote:
Originally Posted by Roydd85 View Post
In all of your opinions, is the Korn shell better than the Bourne again shell?
For what I do with shell I find them nearly indistinguishable. The most noticable difference seems the documentation. Looking up things in ksh means reading a man page. Bash seems to have a man page (at least on NetBSD) but also has info pages. But since I don't even know and am not that interested right now in what extra useful features bash has I prefer ksh for being smaller and being in base and heavily used in OpenBSD.

I have heard of someone (Bradley Kuhn of Software Conservancy and FSF, IIRC) who had his whole command line history for all time (like over a decade or something) available in his bash command history. I don't know if that's possible or not in OpenBSD's pdksh. Seems to me Bradley contributed something to bash to make it possible, so maybe not.

If the idea of less is more comes to appeal extra strongly to you, perhaps it's worth looking (someday?) at what plan 9 chose for their default shell: rc. I've been playing with it a little along with acme using plan9port, but it's bin a bit rough because my system now has two personalities: regular Unix and plan 9 wannabe (actually, three counting emacs).

Another interesting obscure shell out there is inferno's. Particularly intriguing there is that it has some kind of extensibility support via a module interface.

Finally, as a counterpoint to Unix admiration it might someday be worth reading Olin Shivers's paper criticizing Unix shell scripting and describing his scsh shell (but only if you first start learning lisp some?).

But getting back to reality, I agree it's probably best that you should start with ksh. When scripting be sure to use pdksh in "sh mode", i.e. /bin/sh not /bin/ksh, so you're only using standard bourne shell features, not the ksh extensions. It might be a useful exercise to diff the manual pages sh(1) and ksh(2).
Reply With Quote