in reply to Re: Re: Why a C shell?
in thread Why a C shell?

Yes the default is /bin/sh not csh nor tcsh. One can rewrite your libc's implementation of the system() function to call another shell if you'd like but it rarely gets invoked as a login shell. Most system() implementations hard wire to <kbd>/bin/sh -c</kbd> or the equivalent for your system (e.g. Linux has a symlink named /bin/sh that points to /bin/bash).

Historically sh was the first shell (circa 1972) and there was no csh (much less a tcsh) until Bill Joy and the BSD gang decided that they wanted a shell with a syntax closer to the C programming language syntax. By most any measure they failed miserably (among other things {t}csh script do not use a semi-colon as a statement terminator nor as statement separator). csh implementations vary quite widely between vendors - since Bill's csh source was never opened various line length limits were allowed to creep into various csh flavors. That csh could not even support shell functions meant that it was nowhere near C's usefulness.

By "default CLI" I think that the previous poster meant /bin/sh, and was not referring to the shell entry in /etc/passwd for any user.

Replies are listed 'Best First'.
Re: Re: Re: Re: Why a C shell?
by Anonymous Monk on May 23, 2001 at 22:58 UTC
    Linux has a symlink named /bin/sh that points to /bin/bash

    It's worth pointing out that the shell will behave differently depending on whether it is called as sh or bash, so the fact that /bin/sh and /bin/bash are the same file does not mean they behave the same when they are executed, they share a lot of code (both being bourne shells) which is why they were made into the same file but bash enhancements won't work from /bin/sh.