Ask HN: Why don't more people use the Korn Shell (/bin/ksh)?
Why is it generally ignored in the shell discussions?
[1] http://www.kornshell.com/info
Why is it generally ignored in the shell discussions?
[1] http://www.kornshell.com/info
For scripts to be portable, the wisest choice is /bin/sh.
For interactive use, it is a matter of preference.
FreeBSD used to default to tcsh.
OpenBSD used to default to ksh.
Personally I prefer /bin/sh as both interactive and non-interactive.
This way all my scripts, no matter how small, are portable.
And it has enabled me to "master" /bin/sh as a language. I cannot even begin to describe all the advantages I get from that. I'm a shell junkie.
But I understand your thought. ksh is superior in many ways. Certainly a more sensible shell than bash, IMHO.
And though they may not be popular, csh and tcsh have some useful features not found in /bin/sh or ksh.
Most shell discussions on HN draw commnents from people whose primary programming languages are Python or other large scripting languages that more or less make shell programming obsolete. The only time they use the shell is when they have to, not to accomplish "real work", and certainly not for fun.
Thus the shells mentioned are usually ones geared toward interactive use.
/bin/sh builds my kernels and userlands. I use it every day for just about everything, mainly through libraries of small scripts I continually write and rewrite. I do not even have Python or any other large scripting language installed.
And speaking of csh, I recently gave it a try on NetBSD after reading "An Introduction To The C Shell" by Bill Joy. I do kind of like it but I gave up as I just couldn't deal with using Esc for file completion instead of Tab.
That's how I ended up giving Tcsh a try.
Is that not the case?
I've recently tried Bash, Tcsh, Zsh, and Fish. I ended up going with Tcsh, which Zsh being a close second, but honestly my choice was complete bullshit as it is based in nothing but preference.
As for Ksh, I particularly like OpenBSD's version, which is based on pdksh. Sadly, OpenBSD doesn't maintain a portable version like they do with some of their other products (OpenSSH, OpenSMTP, etc).