13.2. The TC Shell Environment

13.2.1. Initialization Files

After the tcsh program starts, it is programmed to execute a systemwide startup file, /etc/csh.cshrc, and then two shell initialization files in the user's home directory: the .tcshrc file and then the .login file. These files allow users to initialize their own environment.

Example 13.2.
# /etc/csh.cshrc
# Systemwide environment and startup programs for csh users 1 if ($?PATH) then 2 setenv PATH "${PATH}:/usr/X11R6/bin" else 3 setenv PATH "/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin" endif 4 if ($?prompt) then 5 [ "$SHELL" = /bin/tcsh ] 6 if ($status == 0) then 7 set prompt='[%n@%m %c]$ ' 8 else 9 set prompt=\['id -nu'@'hostname -s'\]\$\ 10 endif endif 11 limit coredumpsize 1000000 ...

Get UNIX® Shells by Example, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.