Poll: What UNIX shell do you use?

vikingshelmut

100% Bull Plop
I'm conducting an unofficial poll to find out what shell everybody is using in OS X and why. I'm a novice Unix user and am interested in learning which shell everybody think is the best and most usefull. I'm not that interested in the programming or scripting capabilitys yet, but let your voice be heard!

Please answer these questions:

1. Which shell do you use: sh, csh, tcsh (default), korn, or zsh.

2. What specific benefit does it offer over tcsh?

3. Is the shell already installed on X, and if not, how did you install it (description only please, no compiling specifics).

4. What is the best book to learn the basics of your chosen shell.

Thanks in advance to everybody who responds. Your help is greatly appreciated!
 
You could post a real 'poll' thread.


FWIW I generally use tcsh, easier to learn and very fast.

Bash is not bad.

I shy away from ksh, it's designed to be like vi, and it theory it helps not to move your fingers away from the keyboard to do everything. That's a flawed concept with mouse-based systems.


dani++
 
I use the tsch ;)
I am jsut used to it from all these years on a solaris machine doing CS homework lol
 
tcsh

I think you'll be hard pressed to find someone that likes a shell other tcsh or bash, though I know a couple of zsh zealots.
 
Originally posted by dani++
I shy away from ksh, it's designed to be like vi, and it theory it helps not to move your fingers away from the keyboard to do everything. That's a flawed concept with mouse-based systems.

What? You obviously haven't come across:

$ set -o emacs

it's the only way to use the CLI. The command line editing/recall features of the official ksh are fantastic. The pdksh has a wonkier version that isn't quite as good.

For writing shell scripts, ksh runs rings around the rest, with a very powerful set of builtin functions, easy manipulation of file descriptors for file I/O, and a powerful set of string pattern matching functions too. It's also the POSIX compliant shell, so baring any differences in filesystem layout, you will find that your ksh scripts should run unchanged on any commercial Unix.

None of the commercial Unix's ship tcsh or bash as standard, but they all ship ksh.

ksh is my first choice every time.
 
Originally posted by dani++
I shy away from ksh, it's designed to be like vi, and it theory it helps not to move your fingers away from the keyboard to do everything. That's a flawed concept with mouse-based systems.

I disagree. I much prefer to not have to move away from the keyboard to do things while I'm in a terminal session. I find it far more efficient to be able to continue pounding away, without stopping to grab the mouse.

As neondiet mentioned, ksh allows for excellent line recall and editing functions, although I've never had any huge issue with pdksh behaving strangely. Of course, I do 'set -o vi', since any civilized person knows that vi is far superior to emacs... :D (vi vs. emacs is one of those religious topics, like Mac vs PC that spawns many many holy wars)
 
I use tcsh. Since I really started using UNIX the shell was tcsh, so I know it. I know BASH is really good, but tcsh is what I really know, and I prefer its command completion and such. After all this time I really don't see any reason to switch, since there is nothning I really need otherwise. tcsh has either an emacs (default) or vi mode for the command line, and although I use vi as my text editor, I am so used to the emacs commands for the command line, and generally in every UNIX OS. Really too bad only a few things in OS X support this, like TextEdit.
 
i installed bash from binary and i like it very much. i haven't done much shell scripting with it yet other than my .bashrc .. any cool bash prompts??
 
I use bash as well... installed it from binaries I think


I like bash for many reasons but here are a few:
in tcsh, to add something to your path, you have to type something like setenv $PATH $PATH:/usr/bin
in bash you just type PATH=$PATH:/usr/bin

The real reason I use bash, though is because I was brought into linux with bash, so every stupid shell thing I know is bash. While I haven't come up with much I like/dislike between tcsh and bash, I just feel more comfortable in bash.

Bash prompt:
[\u@\h \W]\$
 
ksh (korn for those that don't know)

set -o emacs and off I go.....


and the book to learn it by is O'Reilly's Learning the Korn Shell
 
OS X doesn't come with ksh, does it?

I vaguely remember looking for it (a while ago), and it wasn't there. Is my memory starting to go already, or am I just inept?

-tony

BTW, tcsh doesn't appreciate it when I hit the <esc> key ;)
 
That's too bad. There are some great key combos in tcsh with the ESC key. ESC-w deletes back a word, for example. When I see people holding down the backspace key on a command line, it drives me up the wall. :)
 
Originally posted by tony
OS X doesn't come with ksh, does it?

I vaguely remember looking for it (a while ago), and it wasn't there. Is my memory starting to go already, or am I just inept?

Neither ;). OSX does not, indeed, ship with ksh. But if you've the devtools, you can build your own from sources at http://www.cs.mun.ca/~michael/pdksh/

As some have noted, there are differences between pdksh, and the 'official' AT&T version, but I've never found them to be great enough to matter for everyday use.
 
Mac OS X doesn't have ksh, technically, but it has zsh, which has a ksh-compatible function. Simply

Code:
sudo ln -s zsh /bin/ksh

and you have ksh.
 
Yep, I know that there is the emacs mode on ksh. But I use the vi mode as it i actually know more vi commands than emacs ones (I've never remembered those bizarre CTRL-x-y combinations).

On a terminal-only session, vi-fingers-on-kb-mode is elegant, but I always do terminal-browser-jEdit sessions and have to use the mouse frequently.

dani++

PS: one important bias is the first shell you use, in my case it was tcsh
 
Originally posted by dani++

PS: one important bias is the first shell you use, in my case it was tcsh

Hmmm... not universally true. I was a sh/bash user for years, until a friend introduced me to the magic and goodness that is ksh... :)
 
Back
Top