Xref: utzoo comp.unix.questions:8934 comp.unix.wizards:10624 Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!mit-eddie!uw-beaver!cornell!mailrus!tut.cis.ohio-state.edu!cwjcc!pirate!chet From: chet@pirate.CWRU.EDU (Chet Ramey) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Shell/Cshell questions Keywords: Shell, Cshell, Unix Message-ID: <31@cwjcc.CWRU.Edu> Date: 22 Aug 88 18:17:42 GMT References: <1145@ndsuvax.UUCP> <839@koko.UUCP> Sender: news@cwjcc.CWRU.Edu Reply-To: chet@pirate.UUCP (Chet Ramey) Organization: CWRU Andrew R. Jennings Computing Center Lines: 32 In article <839@koko.UUCP> ferg@koko.UUCP (John Ferguson) writes: >In article <1145@ndsuvax.UUCP> ncsrini@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@cwjcc.CWRU.EDU | Chet Ramey chet@cwjcc.CWRU.EDU chet@alpha.CES.CWRU.EDU | | "It is, it is a glorious thing to be a pirate king"