Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
c
csh(1) csh(1)
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 cer-
tain 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 col-
lated 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 substitution 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 exe-
cute a command (such as if it was unable to find the command). Beginning at Release 9.0,
csh continues
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.
AUTHOR
csh was developed by the University of California, Berkeley and HP.
FILES
˜/.cshrc A csh script sourced (executed) at the beginning of execution by each shell. See
WARNINGS
˜/.login A csh script sourced (executed) by login shell, after .cshrc at login.
˜/.logout A csh script sourced (executed) by login shell, at logout.
/etc/passwd Source of home directories for ˜name.
/usr/bin/sh Standard shell, for shell scripts not starting with a #.
/etc/csh.login A csh script sourced (executed) before
˜/.cshrc and ˜/.login when start-
ing a csh login (analogous to
/etc/profile in the Bourne shell).
/tmp/sh* Temporary file for <<.
SEE ALSO
cd(1), echo(1), kill(1), nice(1), sh(1), umask(1), access(2), exec(2), fork(2), pipe(2), umask(2), wait(2), tty(7),
a.out(4), environ(5), lang(5), regexp(5).
C Shell tutorial in Shells Users Guide.
Section 1146 18 HP-UX Release 11i: December 2000
___
___