Csh |
|
| .cshrc File |
The .cshrc file is run every time you start a new C-Shell, whether you
open a new terminal window, run a shell script or just type csh at the
prompt. The .cshrc file should hold commands and definitions that you
ALWAYS want to run.
|
| .login File |
The .login file is run for each login
C-Shell you run. A login C-Shell is exactly the same as a regular C-Shell
except that the login shell runs the .login file. Usually when you log in, the
first shell that is run is a login shell, and subsequent ones (i.e., one run
because of shell scripts, etc.) are non-login shells. However, each terminal
window you start under the default EWS setup on the workstations runs a login
shell.
Thus, The .login file
should contain commands and definitions that you want run ONLY when you log in,
for example, setting the terminal type. |
| Path |
When you are issued your account, the .cshrc file contains only one
executed line, which is:
|
| Modification |
****** NOTE : If you modify the .cshrc file, you
must be careful to take into account differences between the different systems.
Failure to do so can result in problems using a particular type of system.
******
In other words, do not place HP-specific commands in your .cshrc file, for if you ever log into a Sun system, you may find that the command either does not work at all or does not have the same effect (or, even worse, has a destructive effect). To account for these differences, the /usr/local/ews/system.cshrc file defines an environment variable called ENVIRON to be the ~e of system you are running on. It can take values of SUN, or HPUX, depending on what type of system you are using. ****** NOTE : YOU MUST LEAVE THE LINE source /usr/local/ews/system.cshrc IN YOUR .cshrc FILE FOR THE ENVIRON VARIABLE TO BE DEFINED.****** |
|
Example .cshrc File |
Here's an example of a modified .cshrc file. In this file, the user
wishes to make changes to his path and create a few aliases, but because of
differences in machines, he must take into account which machine he is logging
into. #Sample .cshrc file # #DON'T REMOVE THIS NEXT LINE! source /usr/local/ews/system.cshrc # #Now that we've done the system-specific stuff, we can #add our own commands. # #If we're on a Sun system, we want to be able to use #Common LISP and define plist to give a full process list. # if ($ENVIRON = = SUN) then set path=($path /usr/local/bin) alias plist "ps -aux" endif # #OK, we're all done! # |
| For more information on UNIX Shells one can look at: |
|---|
|