Next Welcome to my ~/bin 9

addup

        #!/usr/local/bin/perl -na
        BEGIN { $fieldno = shift }
        $total += defined($fieldno) ? (split(/\s+/))[$fieldno-1] : $_;
        END{print $total, "\n" }


Next Menu Copyright © 2005 M. J. Dominus