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