TOTAL(1)                                                              TOTAL(1)



NNAAMMEE
       total - sum up columns

SSYYNNOOPPSSIISS
       ttoottaall [ --mm ][ --ssEE | --pp | --uu | --ll ][ --ttCC ][ --NN [ --rr ]] [ file ..  ]

DDEESSCCRRIIPPTTIIOONN
       _T_o_t_a_l sums up columns of real numbers from one or more files and prints
       out the result on its standard output.

       By default, _t_o_t_a_l computes the straigt sum of each  input  column,  but
       multiplication  can be specified instead with the _-_p option.  Likewise,
       the _-_u option means find the upper limit (maximum), and _-_l  means  find
       the lower limit (minimum).

       Sums  of  powers  can  be  computed  by  giving an exponent with the _-_s
       option.  (Note that there is no space between the _-_s and the exponent.)
       This  exponent can be any real number, positive or negative.  The abso-
       lute value of the input is always taken before the power is computed in
       order  to avoid complex results.  Thus, _-_s_1 will produce a sum of abso-
       lute values.  The default power (zero) is interpreted as a straight sum
       without taking absolute values.

       The  _-_m  option  can be used to compute the mean rather than the total.
       For sums, the arithmetic mean is computed.  For products, the geometric
       mean  is  computed.   (A  logarithmic sum of absolute values is used to
       avoid overflow, and zero values are silently ignored.)

       A count can be given as the number of lines to read before computing  a
       result.   By default, _t_o_t_a_l reads each file to its end before producing
       its result, but the _-_N option (where N  is  a  decimal  integer)  tells
       _t_o_t_a_l to produce a result and reset the calculation after every N input
       lines.  In addition, the _-_r option can be specified to override  reini-
       tialization and thus give a running total every N lines.  If the end of
       file is reached, the current total is printed and  the  calculation  is
       reset before the next file (with or without the _-_r option).

       The  _-_t_C option can be used to specify the input and output tab charac-
       ter.  The default tab character is TAB.

       If no files are given, the standard input is read.

EEXXAAMMPPLLEE
       To compute the RMS value of colon-separated columns in a file:

         total -t: -m -s2 input

       To produce a running product of values from a file:

         total -p -1 -r input

BBUUGGSS
       If the input files have varying numbers of columns,  mean  values  will
       certainly  be off.  _T_o_t_a_l will ignore missing column entries if the tab
       separator is a non-white character, but cannot  tell  where  a  missing
       column should have been if the tab character is white.

AAUUTTHHOORR
       Greg Ward

SSEEEE AALLSSOO
       cnt(1), neaten(1), rcalc(1), rlam(1), tabfunc(1)



RADIANCE                            2/3/95                            TOTAL(1)
