|
|
BSD 4.3tahoe
.TI CSHELL/GENERAL The C Shell Command Interpreter The Unix shell is a program that accepts commands from a user and calls up programs to perform them. As it is also the only way of calling up programs, the shell effectively surrounds the Unix kernel, which is a special program having exclusive access to the computer hardware (memory, processor, disks, etc.) which other programs need to run. Most Unix systems in the world offer users the choice of logging in to one of two shells: (1) the standard shell from Bell Labs, also called the Bourne shell after its author; or (2) the C shell from UC Berkeley, reputed to have a syntax like the C language. The C shell is more convenient for interactive use than the Bourne shell, although it is less efficient for certain applications. The C shell provides a variety of very useful services, but not always in a particularly obvious way. This is partly the fault of the shell and partly the fault of the documentation. The ultimate reference consists of the tersely worded manual pages for "csh" (type "man csh" to see them). As most people find this difficult to read, a document called "An Introduction to the C Shell" is also available. Here is a brief list of the C shell's features. History Substitution: allows previous commands to be redone, possibly with changes Job Control: allows programs to be switched from the foreground to the background, putting programs on hold while intermediate results are checked Command Aliases: provides for renaming commands, abbreviating long commands, or turning off selected commands C Shell Programming: has many useful high-level control structures and variable handling capabilities which make conventional programming less attractive Filename Substitutions: provides for abbreviating groups of files and selecting filenames based on patterns Input/Output Redirection: has input/output constructs for diverting input from any file or program and output to any file or program Start Up Processing at Login: provides for commands to be executed automatically on logging in and customization of personal accounts The help topics on the C shell below do not cover the entire story and some of them will be revised in the near future. You might do well to read them in the order of the list, though this is not required. general The C Shell Command Interpreter internals Internal Operation of the C Shell flowcontrol Control Statements: Branching and Looping expressions Expressions: Arithmetic, Logic Operations, and Decisions history Reusing Previous Commands and Command Parts aliases Renaming and Abbreviating Commands
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.