numtools

perform numerical operations on vectors and matrices in unix pipes
git clone git://src.adamsgaard.dk/numtools # fast
git clone https://src.adamsgaard.dk/numtools.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit 2fc0a75c3eb48893295e00f245e0099977ea4147
parent 0a65db6641cb3aee5a629dd78453e717685b5251
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sat, 11 Sep 2021 21:09:07 +0200

add simple examples to man pages

Diffstat:
Mmax.1 | 3+++
Mmean.1 | 3+++
Mmin.1 | 3+++
Msum.1 | 3+++
Mtranspose.1 | 5+++++
5 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/max.1 b/max.1 @@ -13,6 +13,9 @@ returns the maximum numerical value for each column in standard input. Input fields must be tab-separated and each line must contain the same number of fields. +.Sh EXAMPLES +.Dl $ printf '1\et2\et3\en4\et5\et6\en' | sum +.Dl 4 5 6 .Sh SEE ALSO .Xr mean 1 , .Xr min 1 , diff --git a/mean.1 b/mean.1 @@ -11,6 +11,9 @@ returns the mean numerical value for each column in standard input. Input fields must be tab-separated and each line must contain the same number of fields. +.Sh EXAMPLES +.Dl $ printf '1\et2\et3\en4\et5\et6\en' | sum +.Dl 2.5 3.5 4.5 .Sh SEE ALSO .Xr max 1 , .Xr min 1 , diff --git a/min.1 b/min.1 @@ -12,6 +12,9 @@ returns the minimum numerical value for each column in standard input. Input fields must be tab-separated and each line must contain the same number of fields. +.Sh EXAMPLES +.Dl $ printf '1\et2\et3\en4\et5\et6\en' | sum +.Dl 1 2 3 .Sh SEE ALSO .Xr max 1 , .Xr mean 1 , diff --git a/sum.1 b/sum.1 @@ -11,6 +11,9 @@ returns the numerical sum for each column in standard input. Input fields must be tab-separated and each line must contain the same number of fields. +.Sh EXAMPLES +.Dl $ printf '1\et2\et3\en4\et5\et6\en' | sum +.Dl 5 7 9 .Sh SEE ALSO .Xr max 1 , .Xr mean 1 , diff --git a/transpose.1 b/transpose.1 @@ -12,6 +12,11 @@ flips the rows and columns of a matrix given by standard input, effectively transposing it around the diagonal axis. This means that an input file with N colums and M rows is output as M colums and N rows. +.Sh EXAMPLES +.Dl $ printf '1\et2\et3\en4\et5\et6\en' | transpose +.Dl 1 4 +.Dl 2 5 +.Dl 3 6 .Sh SEE ALSO .Xr max 1 , .Xr mean 1 ,