What's wrong with this Bourne shell script?
Randal Schwartz
merlyn at iwarp.intel.com
Wed Aug 15 03:10:56 AEST 1990
In article <FPB.90Aug13191108 at ittc.ittc.wec.com>, fpb at ittc (Frank P. Bresz) writes:
| >or if you have Jon's addcol, even simpler:
|
| > stat -s * | addcol -2
|
| Where is Jon's addcol. I tried to write one a while back and kept
| screwing it up. I would like to see a working version.
for addcol -1, try:
perl -ane '$s += $F[0]; print "$s\n" if eof;'
for addcol -2:
perl -ane '$s += $F[1]; print "$s\n" if eof;'
Others may be derived by noticing the pattern. :-)
Just another Perl hacker,
--
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III |
| merlyn at iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn |
\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/
More information about the Comp.unix.questions
mailing list