[ Team LiB ] Previous Section Next Section

The TC Shell

The tcsh shell is an enhanced and completely compatible variation of the Berkeley UNIX C shell, csh(1). You can use tcsh as an interactive login shell and a shell script command processor. It includes a command-line editor, programmable word completion, spelling correction, a history mechanism, job control, and a C-like syntax.

Reviewing TC Shell Initialization Files

tcsh, when invoked as an interactive login shell, executes commands from the /etc/csh.cshrc and /etc/csh.login files. It then executes commands from files in the user's home directory, in the following order.

  • ~/.tshrc

  • ~/.cshrc (if /.tcshrc is not found)

  • ~/.history (or the value of the histfile shell variable)

  • ~/.login

  • ~/.cshdirs (or the value of the dirsfile shell variable)

Depending on how the shell is compiled, it may read /etc/csh.login before /etc/csh.cshrc, and ~/.login before ~/.tcshrc or ~/.cshrc and ~/.history.

When you start an interactive shell that is not a login shell, only /etc/csh.cshrc and ~/.tcshrc or ~/.cshrc are read on startup.

Refer to the tcsh(1) manual page for complete information.

graphics/new.gif

NOTE. The Solaris Operating Environment does not provide default csh.cshrc or csh.login files.


graphics/new.gif

An excellent tcsh shell programming reference is Using csh and tcsh, by Paul DuBois, O'Reilly & Associates, 1995.

    [ Team LiB ] Previous Section Next Section