home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / question / 13145 < prev    next >
Encoding:
Text File  |  1992-11-09  |  2.0 KB  |  44 lines

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