SUM v1.02 - find sum of integers in text file

Revised 3-Apr-96. Copyright (c) 1996 by Rune Berg. TextTools Freeware.

Usage - Description - Options - Limitations


USAGE

sum [log logfile] [options] [infile] [to outfile]


DESCRIPTION

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.


OPTIONS

-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.


LIMITATIONS

sum only handles integer numbers, in the range -2147483647 .. 2147483647.

sum does not detect underflows and overflows.


End of document