home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / wizards / 5330 < prev    next >
Encoding:
Text File  |  1992-12-24  |  1.8 KB  |  48 lines

  1. Newsgroups: comp.unix.wizards
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!decwrl!deccrl!news.crl.dec.com!rdg.dec.com!uvo.dec.com!e2big.mko.dec.com!nntpd.lkg.dec.com!ryn.mro4.dec.com!news
  3. From: pjdm@chmeee.enet.dec.com (Peter Mayne)
  4. Subject: Re: How do I invoke a login shell.
  5. Message-ID: <1992Dec24.023633.1365@ryn.mro4.dec.com>
  6. Lines: 35
  7. Sender: news@ryn.mro4.dec.com (USENET News System)
  8. Reply-To: Peter.Mayne@cao.mts.dec.com
  9. Organization: Digital Equipment Corporation
  10. References: <34657@adm.brl.mil> <1992Dec16.010628.16046@aw2.fsl.ca.boeing.com> <BzoC13.G8r@bcstec.ca.boeing.com>
  11. Date: Thu, 24 Dec 1992 02:36:33 GMT
  12.  
  13.  
  14. >From article <34657@adm.brl.mil>, by 92700217@vax1.dcu.ie (Ciaran Treanor):
  15. > Hi Wizards,
  16. >         I know this is probably not the right place to ask this question but
  17. >         I need an answer in a hurry. I want to "exec" /bin/csh as a login
  18. >         shell from a script file. In the man page for "csh" it says the
  19. >         following:
  20. >         "If the shell is invoked with a name that starts with '-', as when
  21. >         started by login(1) the shell runs as a login shell. In this case,
  22. >         after executing commands from the .cshrc file, the shell executes
  23. >         commands from the .login file in your home directory."
  24. >         How do you invoke /bin/csh with a name that starts with a '-'?
  25. >         Do you mess around with argv[0], if so how do you do that in a
  26. >         shell script?
  27. >         Is there any other of invoking a login /bin/csh?
  28. >>>         I'm working on a Sparc 10 running SunOS 4.1.3.
  29. >>> 
  30. >>> Thanks in advance and apologies if this is a really stupid question!
  31. >>> 
  32. >>> Ciaran.
  33.  
  34. How about
  35.  
  36.     # ln -s /bin/csh -
  37.     # -
  38.  
  39. PJDM
  40. --
  41. Peter Mayne                     | My statements, not Digital's.
  42. Digital Equipment Corporation   |
  43. Canberra, ACT, Australia        | "AXP!": Bill the Cat
  44.  
  45.