HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)
c
csh(1) csh(1)
primitive pattern to be malformed. For example,
’echo [’ still gives an error.
notify If set, csh notifies you immediately (through your standard output device) of back-
ground job completions. The default is unset (indicate job completions just before
printing a prompt).
path Each word of the path variable specifies a directory in which commands are to be
sought for execution. A null word specifies your current working directory. If there is
no path variable, only full path names can be executed. When path is not set and
when users do not specify full path names,
csh searches for the command through
the directories
. (current directory) and /usr/bin .A
csh which is given neither
the
-c nor the -t option normally hashes the contents of the directories in the
path variable after reading .cshrc, and each time the
path variable is reset. If
new commands are added to these directories while the shell is active, it is necessary
to execute
rehash for csh to access these new commands.
prompt This variable lets you select your own prompt character string. The prompt is printed
before each command is read from an interactive terminal input. If a
! appears in
the string, it is replaced by the current command history buffer event number unless a
preceding
\ is given. The default prompt is the percent sign (%) for users and the
#
character for the super-user.
savehist The number of lines from the history list that are saved in ˜/.history when the
user logs out. Large values for savehist slow down the csh during startup.
shell This variable contains the name of the file in which the csh program resides. This
variable is used in forking shells to interpret files that have their execute bits set but
which are not executable by the system. (See the description of Non-Built-In Com-
mand Execution).
status This variable contains the status value returned by the last command. If the com-
mand terminated abnormally, 0200 is added to the status variable’s value. Built-in
commands which terminated abnormally return exit status 1, and all other built-in
commands set status to 0.
time This variable contains a numeric value that controls the automatic timing of com-
mands. If set, csh prints, for any command taking more than the specified number
of cpu seconds, a line of information to the standard output device giving user, system,
and real execution times plus a utilization percentage. The utilization percentage is
the ratio of user plus system times to real time. This message is printed after the
command finishes execution.
verbose This variable is set by the -v command line option. If set, the words of each com-
mand are printed on the standard output device after history substitutions have been
made.
Command and File name Substitution
The remaining substitutions, command and file name substitution, are applied selectively to the arguments
of built-in commands. This means that portions of expressions that are not evaluated are not subjected to
these expansions. For commands which are not internal to the shell, the command name is substituted
separately from the argument list. This occurs very late, after input-output redirection is performed, and
in a child of the main shell.
Command Substitution
Command substitution is indicated by a command enclosed in grave accents ( ` . . .`). The output from such
a command is normally broken into separate words at blanks, tabs and newlines, with null words being dis-
carded; this text then replacing the original string. Within double quotes, only newlines force new words;
blanks and tabs are preserved.
In any case, the single final newline does not force a new word. Note that it is thus possible for a command
substitution to yield only part of a word, even if the command outputs a complete line.
File name Substitution
Each command word is processed as a pattern for file name substitution, also known as globbing, and
replaced with a sorted list of file names which match the pattern. The form of the patterns is the Pattern
Matching Notation defined by regexp(5) with the following exceptions:
Section 1−−142 Hewlett-Packard Company − 14 − HP-UX 11i Version 1: September 2005