diff options
Diffstat (limited to 'man/man1/reduce.1')
-rw-r--r-- | man/man1/reduce.1 | 28 |
1 files changed, 28 insertions, 0 deletions
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) |