What are the fundamental differences between the mainstream *NIX shells and what scenarios might prompt you to use one over the other?  I understand that some of it probably comes down to user preference but I've only ever used bash and I'm interested to hear where another shell might be useful.Also, is there an impact on user-written shell scripts when running under one shell or another or is it simply a matter of changing the shell at the top of the file?  My instinct says it's not that easy.
What are the fundamental differences between the mainstream *NIX shells?
shell
For interactive use, there are two main contenders, bash and zsh, plus the straggler tcsh and the newcomer fish.Bash is the official shell of the GNU project and the default shell on most Linux distributions. On other unices that don't ship with a decent interactive shell as part of the base installation, I think bash is what people tend to choose, in a self-reinforcement bash is everywhere so I'll use it too loop. See also Why is bash everywhere? (with a lot of historical information).Zsh has almost every feature of bash and many more (useful!) features. Its main downside is being less well-known, which as a practical matter means you're less likely to find it already installed on a system someone else set up and there is less third-party documentation about it. See also What zsh features do you use?, What features are in zsh and missing from bash, or vice versa?.Tcsh was once (up to the early 1990s) the shell with the best interactive features, like its predecessor csh. That made it popular for interactive use (but not for scripting). Zsh caught up with tcsh and fairly quickly improved further, and bash caught up (with programmable completion) in the early 2000s, while tcsh has barely made any progress in the past 15 years. Therefore there is little reason to learn tcsh now.Fish tries to be cleaner than its predecessors. It has some neat features (simpler syntax, syntax coloring on the command line) but lacks others (whatever the author doesn't like). The fish community is a lot smaller than even zsh's, making the effects even more acute. See also What are the differences between fish and zsh ?.For scripting, there are several languages you might want to target, depending on how portable you want your scripts to be.Anything that pretends to be Unix-like has a Bourne-derived shell as /bin/sh. There are still some commercial unices around where /bin/sh is not POSIX compliant.Almost every now-running unix has an sh executable that is at least compliant with at least POSIX.2-1992 and usually at least POSIX:2001 a.k.a. Single Unix v3. This shell might live in a different directory such as /usr/bin/posix or /usr/xpg6/bin. POSIX emulation layers also exist for just about every system that's powerful enough to support it, making it an attractive target.Many unix systems have ksh93, which brings some very useful features that POSIX sh lacks (arrays, associative arrays, extended globs (*(foo), @(foo|bar), ), null globs (~(N)foo*), ). Ksh was initially commercial software (it became free in 2000, after some habits had set), and many free unices (Linux, *BSD) got into the habit of only providing a much older free clone (pdksh) lacking many of these useful features. Pdksh is now getting displaced by mksh outside of OpenBSD, but even mksh falls short of implementing all ksh93 features. Today, you can't count on ksh93 being available everywhere, especially on Linux where bash is the norm.Bash is always available on Linux (except some embedded variants) and often on other unices. It has most of ksh93's useful features, though sometimes with a different syntax.Zsh has most of ksh93 and bash's useful features. Its core syntax is cleaner but incompatible with Bourne. Except for Apple OS/X, don't count on zsh being available on a system you didn't install.For more advanced scripting, you can turn to Perl or Python. These languages have proper data structures, decent text manipulation features, decent process combination and communication mechanisms, and tons of available libraries. Most unix systems have them, either bundled with the OS or installed by the administrator (because there are so many Perl and Python scripts out there that it's a rare system that doesn't have at least one of each).