home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3727 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  2.6 KB

  1. Xref: sparky comp.unix.shell:3727 comp.unix.questions:10599
  2. Newsgroups: comp.unix.shell,comp.unix.questions
  3. Path: sparky!uunet!munnari.oz.au!manuel!csc.canberra.edu.au!taiji.canberra.edu.au!kim
  4. From: Kim Holburn <kim@csc.canberra.edu.au>
  5. Subject: Re: Shell Scripts vs. C programs
  6. Message-ID: <1992Sep1.073956.27085@csc.canberra.edu.au>
  7. X-Xxmessage-Id: <A6C95F2ACB0105C3@taiji.canberra.edu.au>
  8. X-Xxdate: Tue, 1 Sep 92 01:55:54 GMT
  9. Sender: news@csc.canberra.edu.au
  10. Organization: University of Canberra
  11. X-Useragent: Nuntius v1.1.1d9
  12. References: <1992Aug31.211738.1909@tjhsst.vak12ed.edu> <la5rr9INNac3@almaak.usc.edu> <1992Sep1.044434.7193@news.acns.nwu.edu>
  13. Date: Tue, 1 Sep 92 07:39:56 GMT
  14. Lines: 37
  15.  
  16. In article <1992Sep1.044434.7193@news.acns.nwu.edu> John Navarra,
  17. navarra@casbah.acns.nwu.edu writes:
  18. >>>I've heard that if at all possible, code a program as a shell script
  19. >>>rather than coding it in C.  Can someone explain the rationale behind
  20. >>>this philosophy?
  21. >>
  22. >>    BZZZ - shell scripts are non-portable
  23. >>
  24. >    Huh? Why are shell scripts non-portable? Unless you are using
  25. >a non-standard shell, shell scripts are HIGHLY portable! Even if you
  26. >aren't using a non-standard shell, say [ba|k|z|]sh, it is highly
  27. portable.
  28. >For one, most [ba|k|z]sh scripts will run in sh and vice versa. And, if
  29. you 
  30. >need to, you can always get shell X and compile it on your machine. This
  31. is
  32. >*usually* easier than rewriting C-code to accomodate your OS. 
  33. >
  34.  
  35. Not true. Having just had to port a set of programs that included C
  36. programs and bourne-shell scripts from sunOS 4.1.x to sequent Dynix/ptx
  37. (system V release 3.2). I can say that while the C took a day to port,
  38. the shell scripts have taken over a week with another week maybe 2
  39. likely. The C, because of conditional compilation is still a uniform set
  40. of source. The scripts have diverged fairly rapidly and are not
  41. interchangeable at all now. 
  42.  
  43. +----------------------------+-----------------------------------------+
  44. |   Kim Holburn              |   Internet : kim@csc.canberra.edu.au    |
  45. |   Computer Services Centre |                                         |
  46. |   University of Canberra   |   Phone    : (06)201 2203, (06)201 2401 |
  47. |   PO Box 1 Belconnen       |                                         |
  48. |   ACT  Australia           |   Fax      : (06)201 5074               |
  49. +----------------------------+-----------------------------------------+
  50. |     born again and again and again and again and again buddhist      |
  51. |                    well... in a previous life anyway  :-)            |
  52. +----------------------------------------------------------------------+
  53.