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

  1. Xref: sparky comp.unix.shell:3725 comp.unix.questions:10594
  2. Path: sparky!uunet!wupost!waikato.ac.nz!aukuni.ac.nz!ecmtwhk
  3. Newsgroups: comp.unix.shell,comp.unix.questions
  4. Subject: Re: Shell Scripts vs. C programs
  5. Message-ID: <1992Sep1.045614.3062@ccu1.aukuni.ac.nz>
  6. From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
  7. Date: Tue, 1 Sep 1992 04:56:14 GMT
  8. References: <1992Aug31.211738.1909@tjhsst.vak12ed.edu>
  9. Organization: University of Auckland, New Zealand.
  10. Keywords: shell script, C
  11. Lines: 19
  12.  
  13. nurban@tjhsst () writes:
  14.  
  15. >I've heard that if at all possible, code a program as a shell script
  16. >rather than coding it in C.  Can someone explain the rationale behind
  17. >this philosophy?
  18.  
  19. "If at all possible" seems a bit too strong to me, but I certainly
  20. like shell scripts.
  21.  
  22. The "divide and conquer" way of doing things via pipes is something I
  23. like quite a lot. You can subdivide many tasks into smaller parts, each
  24. of which can be processed by a single sed, nawk, sort or whatever
  25. command. The single tasks are usually simple enough so you can easily
  26. test them, one at a time. Writing a monolithic C program would take much
  27. longer in most cases.
  28. -- 
  29. Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
  30. The joy of engineering is to find a straight line on a double logarithmic
  31. diagram.
  32.