Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!snorkelwacker!husc6!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.unix.wizards Subject: Re: What is a good way to do general execs? Message-ID: Date: 13 Jun 90 22:05:47 GMT References: <347@exodus.Eng.Sun.COM> <3449@auspex.auspex.com> <805@ehviea.ine.philips.nl> <3459@auspex.auspex.com> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 32 In-reply-to: guy@auspex.auspex.com's message of 13 Jun 90 18:21:20 GMT In article <3459@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: | >|The Bourne shell sources ".profile" *only* for login shells (just as the | >|C shell sources ".login" only for login shells - the "-f" in | >|"#! /bin/csh -bf" is there to prevent it from sourcing your ".cshrc"). | > | >Nope. For the man page for 'sh': | > | > Invocation. | > If the first character of argument zero is -, commands are | > read from $HOME/.profile, if such a file exists. | | I consider "login shell" basically short for "shell with the first | character of argument zero a '-'" (which means that any shell fired up | by "login" is a login shell, but so are shells fired up by e.g. "su" | when run with the appropriate flag). I considered the more detailed | explanation unnecessary and extraneous in this case.... On the same thread, I sometimes want to create a login shell when I'm not logging in, and not all shell's have a -login switch like bash does. You can get around this by symlinking the appropriate shell to - in your executable directory, ie: lrwxrwxr-x 1 meissner 19 Jun 2 14:11 -ksh -> /usr/bin/ksh lrwxrwxr-x 1 meissner 7 May 16 15:13 -sh -> /bin/sh lrwxrwxr-x 1 meissner 8 May 16 15:13 -sh5 -> /bin/sh5 -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA Catproof is an oxymoron, Childproof is nearly so