HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)

c
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-Defined 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 modified unless
modified explicitly by the user.
csh copies the HP-UX environment 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 find 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 -x command 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 file 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 overflow. 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-UX environment. File name expansion of tilde (˜)
refers to this variable.
ignoreeof If set, csh ignores end-of-file characters from input devices that are terminals.
csh exits normally when it encounters the end-of-file condition (CTRL-D typed as the
first character on a command line). Setting ignoreeof prevents the current shell from
being killed by an accidental (CTRL-D. However, to prevent an infinite loop of EOF
input, csh terminates if it receives 26 consecutive EOFs.
mail This variable contains a list of the files 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 file name that has been
modified since the last check (resulting from mail being put in the file), csh prints
You have new mail.
If the first word of the value of mail is numeric, that number specifies a different
mail checking interval in seconds.
If multiple mail files are specified, the shell says New mail in file_name, where
file_name is the file 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 files.
noglob If set, file name expansion is inhibited. This is most useful in shell scripts that are not
dealing with file names, or after a list of file names has been obtained and further
expansions are not desirable.
nonomatch If set, it is no longer an error for a file name expansion to not match any existing files.
If there is no match, the primitive pattern is returned. It is still an error for the
HP-UX 11i Version 1: September 2005 13 Hewlett-Packard Company Section 1141