home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / shell / 3924 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  1.7 KB

  1. Path: sparky!uunet!usc!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!sumax!thebes!camco!Celestial.COM!bill
  2. From: bill@Celestial.COM (Bill Campbell)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: KSH: how to stop $ENV
  5. Message-ID: <1992Sep12.165947.5450@Celestial.COM>
  6. Date: 12 Sep 92 16:59:47 GMT
  7. References: <1992Sep11.132901.26395@bnr.ca> <1992Sep11.171131.29549@u.washington.edu>
  8. Organization: Celestial Software, Mercer Island, WA
  9. Lines: 34
  10.  
  11. In <1992Sep11.171131.29549@u.washington.edu> donn@carson.u.washington.edu (Donn Cave) writes:
  12.  
  13. :space%bnr.ca (Scott Pace) writes:
  14.  
  15. :| I have a shell script written in ksh (i.e. has #! /bin/ksh at the start).
  16. :| How do I prevent the ksh from executing $ENV?  This is on HP-UX 7.05.  I
  17. :| have read the man page, and I don't see any switches that would do this.
  18. :| What I really want is the equivalent of the -f switch in the csh.
  19.  
  20. :#!/bin/ksh -p
  21.  
  22. :But, don't be surprised if it doesn't work!  It works on some Korn shells,
  23. :not others.  It's generally not documented, may be obsolete.  I'd like to
  24. :know - I think it's a valuable feature.  (It's not the same as expecting your
  25. :users to use the bizarre interactive-only formula for ENV.)
  26.  
  27. :    doesn't work on
  28. :    (DYNIX/ptx 1.3) Version 11/16/88e
  29.  
  30. :    does work on
  31. :    (DYNIX 3.1) Version 11/16/88d
  32. :    (Ultrix 4.2a) Version 11/16/88
  33. :    (AIX 3.2) Version 11/16/88d SBCS
  34.  
  35. Add SCO Xenix 2.3.4 and UNIX 3.2v4 to the list it works on.  Of
  36. course the #! /bin/ksh header doesn't work on Xenix, but the -p
  37. option does :-).
  38.  
  39. Bill
  40. -- 
  41. INTERNET:  bill@Celestial.COM   Bill Campbell; Celestial Software
  42. UUCP:   ...!thebes!camco!bill   6641 East Mercer Way
  43.              uunet!camco!bill   Mercer Island, WA 98040; (206) 947-5591
  44. SPEED COSTS MONEY -- HOW FAST DO YOU WANT TO GO?
  45.