c

csh(1)

csh(1)

primitive pattern to be malformed. For example, 'echo [' still gives an error.

notify If set, csh noti®es you immediately (through your standard output device) of background job completions. The default is unset (indicate job completions just before printing a prompt).

path Each word of the path variable speci®es a directory in which commands are to be sought for execution. A null word speci®es 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 -cnor the -toption 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 ®le in which the csh program resides. This variable is used in forking shells to interpret ®les that have their execute bits set but which are not executable by the system. (See the description of Non-Built-In Command Execution).

status This variable contains the status value returned by the last command. If the command 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 speci®ed 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 ®nishes execution.

verbose This variable is set by the -vcommand line option. If set, the words of each command are printed on the standard output device after history substitutions have been made.

Command and File name Substitution

The remaining substitutions, command and ®le 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 ®nal 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 ®le name substitution, also known as globbing, and replaced with a sorted list of ®le names which match the pattern. The form of the patterns is the Pattern Matching Notation de®ned by regexp(5) with the following exceptions:

Section 1142

− 14 −

HP-UX Release 11i: December 2000