Shell/Cshell questions

Chet Ramey chet at pirate.CWRU.EDU
Tue Aug 23 04:17:42 AEST 1988


In article <839 at koko.UUCP> ferg at koko.UUCP (John Ferguson) writes:
>In article <1145 at ndsuvax.UUCP> ncsrini at ndsuvax.UUCP (srini) writes:
>>Hello. Some questions on the working of the shell. I am using C shell.

	[Some stuff about the C-shell]

>>3. What is the exact use of .cshrc and .login? Can one replace the other?
>>   If so, what are the side effects? How are the subshells affected by these
>>   files?

>When Csh starts up, it sources the commands in both .cshrc and .login.

Not every time it starts up -- see below.

>Normally .login contains setup information you wish to be active during
>the entire life of your login session, such as TERM, PATH, ...  The
>.cshrc file is examined for each subsequent invocation of csh, so you
>put stuff there which needs to be modified or reset when a subshell
>starts up.  Someone else should be able to add more to this...

The .login is not sourced on every csh startup (e.g. when starting a new
xterm window), but only those for which the first char of argv[0] is a
hyphen (this denotes a login shell).  Csh can, however, be told to source
the .login file by having the first char be a hyphen.

Chet Ramey
chet at cwjcc.CWRU.EDU


| Chet Ramey            chet at cwjcc.CWRU.EDU    chet at alpha.CES.CWRU.EDU
|
|	"It is, it is a glorious thing to be a pirate king"



More information about the Comp.unix.questions mailing list