csh.1 (2010 09)
c
csh(1) csh(1)
sequence of commands in parentheses to force it into a subshell; i.e.,
(a;b;c).
Because of the signal handling required by csh, interrupts are disabled just before a command is exe-
cuted, and restored as the command begins execution. There may be a few seconds delay between when a
command is given and when interrupts are recognized.
Control over tty output after processes are started is primitive; perhaps this will inspire someone to work
on a good virtual terminal interface. In a virtual terminal interface much more interesting things could
be done with output control.
Alias substitution is most often used to clumsily simulate shell procedures; shell procedures should be
provided rather than aliases.
Commands within loops, prompted for by
?, are not placed in the history list. Control structure should be
parsed rather than being recognized as built-in commands. This would allow control commands to be
placed anywhere, to be combined with
|, and to be used with
& and ; metasyntax.
It should be possible to use the
: modifiers on the output of command substitutions. All and more than
one
: modifier should be allowed on
$ substitutions.
Terminal type is examined only the first time you attempt recognition.
To list all commands on the system along
PATH, enter [Space]-[Ctrl]-[D]
.
The csh metasequence
!˜ does not work.
In an international environment, character ordering is determined by the setting of
LC_COLLATE,rather
than by the binary ordering of character values in the machine collating sequence. This brings with it
certain attendant dangers, particularly when using range expressions in file name generation patterns.
For example, the command,
rm [a-z]*
might be expected to match all file names beginning with a lowercase alphabetic character. However, if
dictionary ordering is specified by
LC_COLLATE, it would also match file names beginning with an
uppercase character (as well as those beginning with accented letters). Conversely, it would fail to match
letters collated after z in languages such as Norwegian.
The correct (and safe) way to match specific character classes in an international environment is to use a
pattern of the form:
rm [[:lower:]]*
This uses LC_CTYPE to determine character classes and works predictably for all supported languages
and codesets. For shell scripts produced on non-internationalized systems (or without consideration for
the above dangers), it is recommended that they be executed in a non-NLS environment. This requires
that LANG, LC_COLLATE, etc., be set to "C" or not set at all.
csh implements command substitution by creating a pipe between itself and the command. If the root
file system is full, the substituted command cannot write to the pipe. As a result, the shell receives no
input from the command, and the result of the substitution is null. In particular, using command substi-
tution for variable assignment under such circumstances results in the variable being silently assigned a
NULL value.
Relative path changes (such as
cd ..), when in a symbolically linked directory, cause csh’s knowledge
of the working directory to be along the symbolic path instead of the physical path.
Prior to HP-UX Release 9.0,
csh, when getting its input from a file, would exit immediately if unable to
execute a command (such as if it was unable to find the command). Beginning at Release 9.0, csh con-
tinues on and attempts to execute the remaining commands in the file. However, if the old behavior is
desired for compatibility purposes, set the environment variable EXITONERR to 1.
When
LARGESCRIPTS is defined, the shell retains as little input as possible in memory. Thus, certain
constructs like goto, that involve rewinding of the shell’s input, may not work properly.
Non-interactive shells will not read the
˜/.history file at the beginning of execution. If required by
the script, the ˜/.history file needs to be read explicitly, using the source command.
AUTHOR
csh was developed by the University of California, Berkeley and HP.
18 Hewlett-Packard Company − 18 − HP-UX 11i Version 3: September 2010