Next Welcome to my ~/bin 7

awk

     In article <l8bHn=?l3@cs.psu.edu> flee@cs.psu.edu (Felix Lee) writes:
     : awk is much better than perl at one-line summations:
     :  awk '{t += $1} END {print t}'

     Hey, I had to let awk be better at something...  :-)

        #!/usr/local/bin/perl -na
        $total += $F[0];
        END {print $total, "\n" }


Next Menu Copyright © 2005 M. J. Dominus