csh(1) | csh(1) |
rread access w write access x execute access e existence
o ownership z zero size f plain ®le d directory
The speci®ed ®lename is command- and
Control of the Flow
csh contains a number of commands that can be used to regulate the ¯ow of control in command ®les (shell scripts) and (in limited but useful ways) from terminal input. These commands all operate by forcing the shell to reread or skip parts of its input and, due to the implementation, restrict the placement of some of the commands.
The foreach, switch, and while statements, as well as the
If the shell's input is not seekable, the shell buffers input whenever a loop is being read and performs seeks in this internal buffer to accomplish the rereading implied by the loop. (To the extent that this allows, backward gotos succeed on
Signal Handling
csh normally ignores quit signals. Jobs running in background mode are immune to signals generated from the keyboard, including hangups. Other signals have the values which the shell inherited from its parent. csh's handling of interrupts and terminate signals in shell scripts can be controlled by onintr. Login shells catch the terminate signal; otherwise this signal is passed on to children from the state in the shell's parent. In no case are interrupts allowed when a login shell is reading the ®le .logout.
Command Line Parsing
csh splits input lines into words at blanks and tabs. The following exceptions (parser metacharacters) are considered separate words:
&ersand;
vertical bar;
;semicolon;
<
>
( left parenthesis;
) right parenthesis; && double ampersand; double vertical bar; << double
>> double
# comment delimiter
The backslash (\) removes the special meaning of these parser metacharacters. A parser metacharacter preceded by a backslash is interpreted as its ASCII value. A newline character (ASCII 10) preceded by a backslash is equivalent to a blank.
Strings enclosed in single or double quotes form parts of a word. Metacharacters in these strings, including blanks and tabs, do not form separate words. Within pairs of backslashes or quotes, a newline preceded by a backslash gives a true newline character.
When csh's input is not a terminal, the # character introduces a comment terminated by a newline.
CSH VARIABLES
csh maintains a set of variables. Each variable has a value equal to zero or more strings (words). Variables have names consisting of up to 80 letters and digits starting with a letter. The underscore character is considered a letter. The value of a variable may be displayed and changed by using the set and
− 11 − | Section 1−139 |
c