home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / xenix / sco / 2538 < prev    next >
Encoding:
Text File  |  1992-07-20  |  1.1 KB  |  29 lines

  1. Newsgroups: comp.unix.xenix.sco
  2. Path: sparky!uunet!uunet.ca!canrem!telly!robohack!ve3ied!bduncan
  3. From: bduncan@ve3ied.UUCP (Bill Duncan)
  4. Subject: Re: shell scripts starting with #!/bin/sh
  5. Organization: TFMCS
  6. Date: Mon, 20 Jul 1992 22:37:02 GMT
  7. Message-ID: <1992Jul20.223702.1924@ve3ied.UUCP>
  8. References: <9207140914.AA04480@dynamix.com>
  9. Lines: 18
  10.  
  11. In article <9207140914.AA04480@dynamix.com> david@dynamix.com (David L. Jarvis) writes:
  12. >Also ...
  13. >
  14. >> in SYSTEM V, the first line either has a : or it doesn't.
  15. >> 
  16. >> If it does, it is a bourne shell script (sh) if it doesn't, it is a csh
  17. >> script.
  18. >
  19. >this doesn't sound right to me ... I ran scripts without the : for years
  20. >and /bin/sh was always the shell used ... it would seem to me that without
  21. >the : indicates to use the current shell as the interpreter, but thats just
  22. >my guess ... (perhaps the : just says that if you're using csh that sh
  23. >should be used instead?)
  24. >
  25.  
  26. You're right on the last count.  The Bourne shell will try to execute anything.
  27. See Chip's notes.  Under Xenix it is a csh hack, and the hack is to execute
  28. /bin/sh if it sees the ":" on the first line.
  29.