home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / shell / 3507 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  764 b 

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