Identifying .login Shells

David Goodenough dg at lakart.UUCP
Mon Feb 13 07:03:27 AEST 1989


>From article <309 at wubios.wustl.edu>, by david at wubios.wustl.edu (David J. Camp):
> Does anyone know a way to determine whether you are in the login shell
> from .cshrc?  -David-

In .cshrc say:

set login=0

and in .login say:

set login=1

Now

if ($login == 1)

you have a login shell. This relies on the fact that .cshrc is executed
by every csh, but .login is only execute by your login csh, AND after
.cshrc has done it's bit.
-- 
	dg at lakart.UUCP - David Goodenough		+---+
						IHS	| +-+-+
	....... !harvard!xait!lakart!dg			+-+-+ |
AKA:	dg%lakart.uucp at xait.xerox.com		  	  +---+



More information about the Comp.unix.questions mailing list