home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!yuma!csn!mcnews!ddb0248
- From: ddb0248@mcnews.mcdata.com (David Beal)
- Newsgroups: comp.unix.shell
- Subject: How to detect login shell in .cshrc ?
- Message-ID: <1992Aug17.224225.21915@mcnews.mcdata.com>
- Date: 17 Aug 92 22:42:25 GMT
- Organization: McDATA Corp.
- Lines: 12
-
- Is there a clean way in your .cshrc to determine whether it is
- being executed by the login shell? I have some commands that I
- want to execute only if this is *not* the login shell.
-
- The best I could come up with is to run "ps" and count the number
- of lines it outputs after maybe grepping them for "csh". Really ugly.
-
- Please reply by email. Thanks.
-
- Dave Beal
- McDATA Corporation
- ddb@mcdata.com
-