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/map.1 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 man/man1/map.1 (limited to 'man/man1/map.1') diff --git a/man/man1/map.1 b/man/man1/map.1 new file mode 100644 index 0000000..1d7a5f5 --- /dev/null +++ b/man/man1/map.1 @@ -0,0 +1,34 @@ +.TH map 1 2023-05-13 utils + +.SH NAME +map \- apply a command to multiple arguments + +.SH SYNOPSIS +.B map +.IR command \ [ arg \ ... ] + +.SH DESCRIPTION +.B map +applies the first parameter to each other argument in turn. + +The first parameter is evaluated and may contain +.I $1 +anywhere, which will be replaced with the other arguments +one after another. +If it doesn't contain it, it will be supplied with the argument as its last, and possibly only, parameter. + +Unlike +.BR xargs (1),\ map +reads the parameters from the command line +rather than from stdin. + +.SH EXAMPLES +.B map +echo +.I 1 2 3 + +.BR map \ 'mv\ "$1"\ dir/' +.I arg1 arg2 arg3 + +.SH SEE ALSO +.BR xargs (1),\ reduce (1),\ fmap (1),\ mapl (1) -- cgit v1.2.3