.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)