summaryrefslogtreecommitdiff
path: root/man/man1/map.1
diff options
context:
space:
mode:
authorDavid Wührer <def@gmx.at>2024-05-18 21:04:34 +0200
committerDavid Wührer <def@gmx.at>2024-05-18 21:04:34 +0200
commit77cfffee6177fb0421fa0fce15d6a1875bde4816 (patch)
tree251428cdd482ea50cfb019dbd3c3bafd79d2fd14 /man/man1/map.1
parent75b23ce1ff0daab363725a2a5755ea80bbeaa68e (diff)
manuals, sum-down, radix
Diffstat (limited to 'man/man1/map.1')
-rw-r--r--man/man1/map.134
1 files changed, 34 insertions, 0 deletions
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)