Which Shell Do You Prefer?
Pascal de Bruijn asks: "I recently started to use NetBSD, the first thing I noticed was that it didn't have a command-line history. So I immediately wanted to switch my shell, being on BSD my first instinct was to change to tcsh, but many people told me it wasn't any good. Others recommended zsh. I would really like to hear your opinions about shells." The submitter is particularly interested in shell memory usage, and the features you like...and dislike...from the current options that are available, today.
Bash baby!
I like bash. It's common, fairly standard. It has history and tab completion. That's all I really need or use. I have it in linux/solaris/cygwin so I'm rarely forced to use something else. Never really cared or needed to use something else.
The GeekNights podcast is going strong. Listen!
But bash gets my vote. I had the same problem when I installed NetBSD. I had to suffer through using sh untill I could networking up. Bash was the first thing I downloaded.
-73, de n1ywb
www.n1ywb.com
This is a preference thing more than anything else. If you want tcsh on NetBSD cd /usr/pkgsrc/shells/tcsh && make install
I've used csh, sh, tcsh, ksh, and bash. I think at one point I used zsh. I found that tcsh, bash and zsh are usually similarly setup, and allow using the arrow keys and tab completion. History is something that you set up, and in these 3 shells its always been setup for me. In using ksh, csh and sh, my experience was eew eew eew, but that is just me. I was used to bash at that point. Bash can be a hog or so I am told. I never measured, ub tit does a lot and it is probably not something you'd want if you were building a flopy based distro. Tcsh is not that bad, and can be added nowadays to just about any UNIX platform. Zsh is supposedly better, but I never used it enough to know if it truely was.
If you are going to do shell scripting then I'd suggest sh for shell scripting. Of course you can write scripts in sh and use tcsh or any other shell if you know what you are doing. Uisng sh for scripting is more portable than perl, tcsh, ksh or bash, as sh is going to be on all modern unix systems. Perl may be on all systems, but don't rely on it. Csh does not allow shell functions, which are kinda handy. Ksh is Suns shell (I think) and I know it is not available on every platforms.
What do you prefer to use that is the real question. Personally I can make just about any shell work for me if I have to....
Only 'flamers' flame!
bash is an extend-and-embrace version of /bin/sh: it encourages people to write broken shell scripts.
/bin/bash is the automatic replacement for a nonexistent /bin/sh, so people write what they think are generic shell scripts, but carelessly include bash-only features. Then their scripts won't work on systems without /bin/bash.
On some of the GNU systems, i.e. Linux,
bash is sorta like Microsoft's Java implementation in that way.
And then you get things like sort behaving in unexpected ways depending on the locale settings...
In general I've found you get best portability from the portable subset of C; perl and python are pretty good, so long as you're careful to only use standard packages.
If you try zsh and you don't think it is worth the bother to lug zsh around, you didn't have much need for zsh in the first place.
I lug zsh everywhere. Do I really want to? Absolutely.
Whatever the intentions of Bash's authors with regard to "embrace and extend" tactics, it can be used perfectly safely, and may well be convenient for the poster.
Bash is one of those programs which acts differently depending on the filename of its executable. When invoked from a copy or a link named /bin/sh, it emulates the traditional Bourne shell without GNU extensions.
Thus, always write your scripts with the traditional #!/bin/sh shebang. If Bash is masquerading as Bourne, it won't hurt you that way. You can still benefit from Bash's extensions for interactive use (such as command editing and history) by setting your shell to /bin/bash via chsh.
But my grandest creation, as history will tell,
Was Firefrorefiddle, the Fiend of the Fell.
It is the default shell for many Linux floppy distributions. It does NOT have command line completion, but when it comes to memory usage, you should really look at it.
Troll: Large Giant, 63 hp, AC 16, Usually chaotic evil.