home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / shell / 3906 < prev    next >
Encoding:
Text File  |  1992-09-11  |  1.8 KB  |  44 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!usenet.coe.montana.edu!news.u.washington.edu!carson.u.washington.edu!donn
  3. From: donn@carson.u.washington.edu (Donn Cave)
  4. Subject: Re: KSH: how to stop $ENV
  5. Message-ID: <1992Sep11.171131.29549@u.washington.edu>
  6. Sender: news@u.washington.edu (USENET News System)
  7. Organization: University of Washington
  8. References: <1992Sep11.132901.26395@bnr.ca>
  9. Date: Fri, 11 Sep 1992 17:11:31 GMT
  10. Lines: 32
  11.  
  12. space%bnr.ca (Scott Pace) writes:
  13.  
  14. | I have a shell script written in ksh (i.e. has #! /bin/ksh at the start).
  15. | How do I prevent the ksh from executing $ENV?  This is on HP-UX 7.05.  I
  16. | have read the man page, and I don't see any switches that would do this.
  17. | What I really want is the equivalent of the -f switch in the csh.
  18.  
  19. #!/bin/ksh -p
  20.  
  21. But, don't be surprised if it doesn't work!  It works on some Korn shells,
  22. not others.  It's generally not documented, may be obsolete.  I'd like to
  23. know - I think it's a valuable feature.  (It's not the same as expecting your
  24. users to use the bizarre interactive-only formula for ENV.)
  25.  
  26.     doesn't work on
  27.     (DYNIX/ptx 1.3) Version 11/16/88e
  28.  
  29.     does work on
  30.     (DYNIX 3.1) Version 11/16/88d
  31.     (Ultrix 4.2a) Version 11/16/88
  32.     (AIX 3.2) Version 11/16/88d SBCS
  33.  
  34. It could be a build option.  For another example, of the Korn shells listed
  35. above, two recognize {} as a globbing expression, as in csh.  (E.g.,
  36. "ls *.{csh,ksh}".)  The other two don't, and I am under the impression that
  37. it's up to the vendor (Sequent seems to think it's worthwhile, IBM and DEC
  38. don't.)  (I don't understand why these options are presented, since it seems
  39. to just offer an opportunity for gratuitous incompatibilities between the
  40. same version of the Korn shell on different platforms.)
  41.  
  42.     Donn Cave, University Computing Services, University of Washington
  43.     donn@cac.washington.edu
  44.