home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!bcstec!warrenc
- From: warrenc@bcstec.ca.boeing.com (Cherie Warren)
- Subject: Re: How do I invoke a login shell.
- Message-ID: <BzoC13.G8r@bcstec.ca.boeing.com>
- Organization: Boeing Computer Services
- References: <34657@adm.brl.mil> <1992Dec16.010628.16046@aw2.fsl.ca.boeing.com>
- Date: Tue, 22 Dec 1992 18:43:50 GMT
- Lines: 37
-
- ten0772@aw2.fsl.ca.boeing.com (Timothy E. Neto ) writes:
- >From article <34657@adm.brl.mil>, by 92700217@vax1.dcu.ie (Ciaran Treanor):
- >> Hi Wizards,
- >> I know this is probably not the right place to ask this question but
- >> I need an answer in a hurry. I want to "exec" /bin/csh as a login
- >> shell from a script file. In the man page for "csh" it says the
- >> following:
- >>
- >> "If the shell is invoked with a name that starts with '-', as when
- >> started by login(1) the shell runs as a login shell. In this case,
- >> after executing commands from the .cshrc file, the shell executes
- >> commands from the .login file in your home directory."
- >>
- >> How do you invoke /bin/csh with a name that starts with a '-'?
- >> Do you mess around with argv[0], if so how do you do that in a
- >> shell script?
- >> Is there any other of invoking a login /bin/csh?
- >>
- >> I'm working on a Sparc 10 running SunOS 4.1.3.
- >>
- >> Thanks in advance and apologies if this is a really stupid question!
- >>
- >> Ciaran.
- >>
- >Try doing a man on 'csh'. You're looking for the command 'start_csh'
-
- 'start_csh' is not generic to the Berkley C shell; it's Apollo-specific,
- and:
- "start_csh is supported for compatibility with previous releases, and
- is not recommended." - quote from Apollo's 'start_csh' man entry.
-
- One might try using an environment variable and a bit of 'if-then-else'
- logic in the .cshrc script...
- --
- Cherie
- warrenc@bcstec.ca.boeing.com
- ...!uunet!bcstec!warrenc
-