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

  1. Newsgroups: comp.unix.wizards
  2. Path: sparky!uunet!bcstec!warrenc
  3. From: warrenc@bcstec.ca.boeing.com (Cherie Warren)
  4. Subject: Re: How do I invoke a login shell.
  5. Message-ID: <BzoC13.G8r@bcstec.ca.boeing.com>
  6. Organization: Boeing Computer Services
  7. References: <34657@adm.brl.mil> <1992Dec16.010628.16046@aw2.fsl.ca.boeing.com>
  8. Date: Tue, 22 Dec 1992 18:43:50 GMT
  9. Lines: 37
  10.  
  11. ten0772@aw2.fsl.ca.boeing.com (Timothy E. Neto ) writes:
  12. >From article <34657@adm.brl.mil>, by 92700217@vax1.dcu.ie (Ciaran Treanor):
  13. >> Hi Wizards,
  14. >>         I know this is probably not the right place to ask this question but
  15. >>         I need an answer in a hurry. I want to "exec" /bin/csh as a login
  16. >>         shell from a script file. In the man page for "csh" it says the
  17. >>         following:
  18. >> 
  19. >>         "If the shell is invoked with a name that starts with '-', as when
  20. >>         started by login(1) the shell runs as a login shell. In this case,
  21. >>         after executing commands from the .cshrc file, the shell executes
  22. >>         commands from the .login file in your home directory."
  23. >> 
  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. >> 
  29. >>         I'm working on a Sparc 10 running SunOS 4.1.3.
  30. >> 
  31. >> Thanks in advance and apologies if this is a really stupid question!
  32. >> 
  33. >> Ciaran.
  34. >> 
  35. >Try doing a man on 'csh'.  You're looking for the command 'start_csh'
  36.  
  37. 'start_csh' is not generic to the Berkley C shell; it's Apollo-specific,
  38. and:
  39.      "start_csh is supported for compatibility with previous releases, and
  40.      is not recommended."  - quote from Apollo's 'start_csh' man entry.
  41.  
  42. One might try using an environment variable and a bit of 'if-then-else'
  43. logic in the .cshrc script...
  44. -- 
  45. Cherie
  46. warrenc@bcstec.ca.boeing.com
  47. ...!uunet!bcstec!warrenc
  48.