Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!emory!ogicse!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.unix.questions Subject: Re: What's wrong with this Bourne shell script? Message-ID: <1990Aug16.073729.4296@iwarp.intel.com> Date: 16 Aug 90 07:37:29 GMT References: <1990Aug6.172225.20319@iwarp.intel.com> <850@jonlab.UUCP> <9116@jpl-devvax.JPL.NASA.GOV> <1474@chinacat.Unicom.COM> <1990Aug14.171056.17982@iwarp.intel.com> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 21 In-Reply-To: fpb@ittc.wec.com (Frank P. Bresz) In article , fpb@ittc (Frank P. Bresz) writes: | That would be fine if I had or wanted pearl. I was under the | impression that Jon's addcol was an awk script (I think that's where the | original thread came from anway) in which the -# was the column you wanted | to add and it would magically add up the numbers in column 1 or 7 or | whatever column you wanted under argumentalized control instead of having | separate scripts for each possible set of columns you want to add. Well, the script in awk is almost as easy: ... | awk '{ $x += $3 } END { print $x }' | who needs anything else? (But in Perl you can write it in one line. :-) Just another Perl hacker, more-or-less, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/