home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.shell:3799 comp.unix.questions:10677
- Newsgroups: comp.unix.shell,comp.unix.questions
- Path: sparky!uunet!cs.utexas.edu!wupost!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!casbah.acns.nwu.edu!navarra
- From: navarra@casbah.acns.nwu.edu (John Navarra)
- Subject: Re: Shell Scripts vs. C programs
- Message-ID: <1992Sep3.072033.1112@news.acns.nwu.edu>
- Keywords: shell script, C
- Sender: usenet@news.acns.nwu.edu (Usenet on news.acns)
- Organization: Northwestern University, Evanston Illinois.
- References: <1992Aug31.211738.1909@tjhsst.vak12ed.edu> <1992Sep1.175031.3612@unx.ucc.okstate.edu>
- Date: Thu, 3 Sep 1992 07:20:33 GMT
- Lines: 36
-
- In article <1992Sep1.175031.3612@unx.ucc.okstate.edu> martin@datacomm.ucc.okstate.edu (Martin McCormick) writes:
- >
- >I always thought you should code your program in C because it executes so
- >much faster. Since I am a beginner at C, I always code in shell scripts,
- >when possible, but that is mainly because it is easier to read, later.
- >I would like to see the answers to this question posted to the group.
- >
- I think you will find, Martin, that many times most of the work
- you do falls into fairly simple catagories:
-
- 1) work aimed at solving an immediate problem
- 2) work aimed at solving a recurring problem numerous times
- 3) work you have time to sugar-coat.
-
- I find that most of the work I do falls into the first two catagories.
- In the first, I want a quick fix; I write a quick shell script; I disgard
- it later. It would have taken me longer to write the C code. In the
- second, I usually find it much quicker and easier to write and maintain
- the shell script even though I may use it many times. When the combined
- execution times of the shell script outdistance the time it takes to
- write the equivalent C program , then I might have lost ground. However,
- I find that once I have a working solution I am not so inclined to
- rewriting that solution because other problems would be beating on my
- door.
-
- That brings us to the last case. And sure, if you have time to sugar-coat,
- you probably have a life! (you know: a wife, kid, dog, car, home, credit
- rating, etc etc.) Time to live the good life! ;-)
-
-
- -tms
- --
- You can get further with a kind word | You can get further with a kind word
- and a gun than a kind word alone. | and a phaser than a kind word and a gun.
- --al capone | -- John Navarra
- =======From the Lab of the MaD ScIenTIst....navarra@casbah.acns.nwu.edu========
-