sum.1 (899B)
1 .Dd $Mdocdate$ 2 .Dt SUM 1 3 .Os 4 .Sh NAME 5 .Nm sum 6 .Nd returns the sum for each column 7 .Sh SYNOPSIS 8 .Nm 9 .Op Fl d Ar delimstr 10 .Op Fl n 11 .Op Fl p Ar prec 12 .Sh DESCRIPTION 13 .Nm 14 returns the numerical sum for each column in standard input. 15 Input fields must be tab-separated and each line must contain the 16 same number of fields. 17 .Pp 18 The options are as follows: 19 .Bl -tag -width Ds 20 .It Fl d Ar delimstr 21 Separate output values by 22 .Ar delimstr . 23 The default delimiter is tab characters. 24 .It Fl n 25 Do not print a newline after the final value. 26 .It Fl p Ar prec 27 Print the output values with 28 .Ar prec 29 digits of precision. 30 By default, the output is printed with 17 digits of precision, which is 31 full double precision on 64-bit systems. 32 .El 33 .Sh EXAMPLES 34 .Dl $ printf '1\et2\et3\en4\et5\et6\en' | sum 35 .Dl 5 7 9 36 .Sh SEE ALSO 37 .Xr max 1 , 38 .Xr mean 1 , 39 .Xr min 1 40 .Sh AUTHORS 41 .An Anders Damsgaard Aq Mt anders@adamsgaard.dk