Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sdd.hp.com!usc!apple!oliveb!orc!inews!kseshadr@quasar.intel.com From: kseshadr@quasar.intel.com (Kishore Seshadri) Newsgroups: comp.unix.questions Subject: Re: how do I tell inside .cshrc if I'm a login shell? Message-ID: <2670@inews.intel.com> Date: 3 Aug 90 22:51:11 GMT References: <614@exodus.Eng.Sun.COM> Sender: news@inews.intel.com Reply-To: kseshadr@quasar.intel.com (Kishore Seshadri) Organization: Intel Corporation, Santa Clara, California Lines: 10 In-reply-to: holtz@strawdog.Eng.Sun.COM (Brian Holtz) echo $$ gives you the pid of the current shell. ps `echo $$` | tail -1 | awk '{print $5}' on my Sun system gives me the name of the shell I'm running. If it has a '-' before the name it usually indicates a login shell. Kishore Seshadri ---------------------------------------------------------------------------- Kishore Seshadri or <..!intelca!mipos3!kseshadr> "The nice thing about standards is that you have so many to choose from."