Date: Sat, 5 Jun 2010 19:30:03 -0700 From: Charlie Kester <corky1951@comcast.net> To: freebsd-questions@freebsd.org Subject: Re: which is the basic differences between the shells? Message-ID: <20100606023003.GA69297@comcast.net> In-Reply-To: <AANLkTilLt8x6njjFgzJW6iKxeUN6I_RB2bDIP_24jos8@mail.gmail.com> References: <AANLkTinG745GjOaZKLT1TfKgqVi6VHt9-ciHWQUY57VT@mail.gmail.com> <AANLkTilLt8x6njjFgzJW6iKxeUN6I_RB2bDIP_24jos8@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat 05 Jun 2010 at 16:24:36 PDT Alejandro Imass wrote: >On Sat, Jun 5, 2010 at 6:35 PM, Giorgos Tsiapaliokas <terietor@gmail.com> wrote: >> hello, >> i am coming from the linux world where i was using the bash shell but i >> found out that there are also much more. >> can u tell me the basic differences between them?(pros and cons) >> > >Too broad a topic I suspect fo u to get an answer here. In FBSD the >base system is completely separate from the applications, that is >really great because for example your system upgrades are >independendent of applications / ports. The base shell is in the base >system so don't replace the shell for the root user but rather start >bash from your root account if you wish. This will make sense when >your system breaks in an upgrade for example. > >For everything else you can safely use bash and choose bash for your >normal users. I use bash all the time even for root, but in the latter >case I start it manually. Definitely too broad a topic for a mailing list. Probably the best way to approach it is to look first at the Bourne shelli (sh), which probably has the smallest and simplest set of features. The C shell (csh) is, as the name suggests, more like the C programming language. It was developed at UC Berkeley, and thus has always had a close association with BSD. One of the major innovations introduced by the C shell is *history*. tcsh is an enhanced but completely compatible version of csh. The Korn shell (ksh) combined many features from the C shell with the functionality of the Bourne shell. Among the many new features introduced by the Korn shell are pattern-based variable substitution, e.g. ${varname%%pattern}. Bash picks up where the Korn shell leaves off, and adds even more features. More features usually means increased size and sometimes slower execution. In fact, if you look at the manpage for bash, the first sentence in the last section ("BUGS") is a frank admission that "It's too big and too slow." It's also too GPL-encumbered for many BSD folk. You can get many of the same features in a lighterweight package, with a friendlier license, by going with one of the Korn shells instead. I've been using shells/mksh from ports after having it recommended to me in the forums, and I've been very satisfied with it.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100606023003.GA69297>