From 77cfffee6177fb0421fa0fce15d6a1875bde4816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20W=C3=BChrer?= Date: Sat, 18 May 2024 21:04:34 +0200 Subject: manuals, sum-down, radix --- man/man1/reduce.1 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 man/man1/reduce.1 (limited to 'man/man1/reduce.1') diff --git a/man/man1/reduce.1 b/man/man1/reduce.1 new file mode 100644 index 0000000..8ca9358 --- /dev/null +++ b/man/man1/reduce.1 @@ -0,0 +1,28 @@ +.TH reduce 1 2023-05-13 utils + +.SH NAME +reduce \- apply a command to multiple arguments + +.SH SYNOPSIS +.B reduce +.IR command\ accumulator \ [ arg \ ... ] + +.SH DESCRIPTION +.B reduce +applies the first parameter to all other arguments in turn. + +The first parameter is taken to be a command +that accepts two parameters, +which will be the accumulator +and all other arguments +one after another, respectively. +With each argument, the accumulator will be replaced with the output of the evaluation of the first parameter. + +Admittedly, this is not as useful as it could be. + +.SH EXAMPLES +.B reduce +.I 'echo -n' 0 1 2 3 + +.SH SEE ALSO +.BR map (1),\ xargs (1) -- cgit v1.2.3