home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!uw-coco!nwnexus!Celestial.COM!bill
- From: bill@Celestial.COM (Bill Campbell)
- Subject: Re: .profile vs. .kshrc
- Organization: Celestial Software, Mercer Island, WA
- Distribution: na
- Date: Mon, 09 Nov 1992 07:19:24 GMT
- Message-ID: <1992Nov09.071924.620@Celestial.COM>
- References: <Bwwo6r.5CE@constant.demon.co.uk> <Bx5wxp.2oH@constant.demon.co.uk> <1992Nov04.233827.1078@trebor.uucp> <1dea38INN9r8@early-bird.think.com>
- Lines: 32
-
- In <1dea38INN9r8@early-bird.think.com> barmar@think.com (Barry Margolin) writes:
-
- .....
- :It's not as good as the C shell's .login and .cshrc facility.
-
- :The main problem with this Korn Shell feature is that it doesn't provide
- :any way to customize the shell environment in a shell that isn't descended
- :from a login shell. These include the shell in which cron, at, and batch
- :jobs run, and commands executed with rsh/remsh. The C shell always
- :executes the user's .cshrc (unless the "-f" option is specified), so you
- :always get your custom environment.
-
- And you always get a long delay starting csh scripts as it deals
- with the .cshrc file if you have all your custom environment in it.
-
- Anything you run from cron requires you to set up your environment
- from scratch anyway, so what's so hard about having a standard
- file included using the '.' command under ksh? I could set certain
- environment variables in /etc/profile and $HOME/.profile that
- allow a program to determine whether proper initialization has
- been done. i.e.
- [ -z "$ETC_PROFILE" ] && . /etc/profile # sets HOME environment
- [ -z "$HOME_PROFILE" ] && . $HOME/.profile
-
- /etc/profile will set ETC_PROFILE and $HOME/.profile sets $HOME_PROFILE
-
- Bill
- --
- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software
- UUCP: ...!thebes!camco!bill 6641 East Mercer Way
- uunet!camco!bill Mercer Island, WA 98040; (206) 947-5591
- SPEED COSTS MONEY -- HOW FAST DO YOU WANT TO GO?
-