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