csh(1)

csh(1)

$< Substitutes a line from the standard input, with no further interpretation thereafter. It can be used to read from the keyboard in a shell script.

Pre-De®ned and Environment Variables

The following variables have special meaning to the shell. Of these autologout, argv, cwd, home, path, prompt, shell, and status are always set by the shell. Except for cwd and status, this setting occurs only at initialization (initial execution of csh). These variables are not modi®ed unless modi®ed explicitly by the user.

csh copies the HP-UXenvironment variable USER into the shell variable user, the environment variable TERM into term, the environment variable HOME into home, and PATH into path. csh copies these values back into the environment whenever the csh variables are reset.

In a windowed environment, if csh detects that the window has changed size, csh sets the environment variables LINES and COLUMNS to match the new window size.

argv

This variable is set to the arguments of the

csh command statement.

It is from this

 

variable that positional parameters are

substituted; i.e.,

$1 is

replaced by

 

$argv[1], etc.

 

 

 

cdpath

This variable gives a list of alternate directories searched to ®nd subdirectories in

 

chdir commands.

 

 

 

cwd

This variable contains the absolute path name of the current working directory.

 

Whenever changing directories (using cd), this variable is updated.

 

echo

This variable is set by the -xcommand line option. If set, all built-in commands and

 

their arguments are echoed to the standard output device just before being executed.

 

Built-in commands are echoed before command and ®le name substitution, since these

 

substitutions are then done selectively. For non-built-in commands, all expansions

 

occur before echoing.

 

 

 

history

This variable is used to create the command history buffer and to set its size. If this

 

variable is not set, no command history is maintained and history substitutions cannot

 

be made. Very large values of history can cause shell memory over¯ow. Values of

 

10 or 20 are normal. All commands, executable or not, are saved in the command his-

 

tory buffer.

 

 

 

home

This variable contains the absolute path name to your home directory.

The variable

 

home is initialized from the HP-UXenvironment. File name expansion of tilde (Ä)

 

refers to this variable.

 

 

 

ignoreeof

If set, csh ignores end-of-®le characters

from input devices

that are terminals.

csh exits normally when it encounters the end-of-®le condition (CTRL-Dtyped as the ®rst character on a command line). Setting ignoreeof prevents the current shell from being killed by an accidental (CTRL-D. However, to prevent an in®nite loop of EOF input, csh terminates if it receives 26 consecutive EOFs.

mail This variable contains a list of the ®les where csh checks for your mail. csh periodically (default is 10 minutes) checks this variable before producing a prompt upon command completion. If the variable contains a ®le name that has been modi®ed since the last check (resulting from mail being put in the ®le), csh prints You have new mail.

If the ®rst word of the value of mail is numeric, that number speci®es a different mail checking interval in seconds.

If multiple mail ®les are speci®ed, the shell says New mail in ®le_name, where ®le_name is the ®le containing the mail.

noclobber This variable places restrictions on output redirection to ensure that ®les are not accidentally destroyed, and that commands using append redirection (>>) refer to existing ®les.

noglob If set, ®le name expansion is inhibited. This is most useful in shell scripts that are not dealing with ®le names, or after a list of ®le names has been obtained and further expansions are not desirable.

nonomatch If set, it is no longer an error for a ®le name expansion to not match any existing ®les. If there is no match, the primitive pattern is returned. It is still an error for the

HP-UX Release 11i: December 2000

− 13 −

Section 1141

c