sum sums up numbers in infile until end-of-file or non-numeric data is found, and prints a one line result to outfile, e.g.:
sum is 540
If sum finds no numbers in infile, it will print:
sum is unknown
If you don't specify infile, sum reads from standard input.
If you don't specify outfile, sum writes to standard output.
If you don't specify logfile, sum writes error messages to
standard error.
-a : Print average of numbers in infile.
-s : Print smallest number in infile.
-b : Print biggest number in infile.
-c : Print count of numbers in infile.
-v : Print version banner and usage info to standard error (or logfile, if given), then exit.
sum only handles integer numbers, in the range -2147483647 .. 2147483647.
sum does not detect underflows and overflows.