APPLY(1) UNIX Programmer's Manual APPLY(1)
apply - apply a command to a set of arguments
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
a
\bap
\bpp
\bpl
\bly
\by [ -
\b-a
\ba_
\bc ] [ -
\b-_
\bn ] command args ...
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
_
\bA_
\bp_
\bp_
\bl_
\by runs the named _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd on each argument _
\ba_
\br_
\bg in turn.
Normally arguments are chosen singly; the optional number _
\bn
specifies the number of arguments to be passed to _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd.
If _
\bn is zero, _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is run without arguments once for each
_
\ba_
\br_
\bg. Character sequences of the form %_
\bd in _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd, where _
\bd
is a digit from 1 to 9, are replaced by the _
\bd'th following
unused _
\ba_
\br_
\bg. If any such sequences occur, _
\bn is ignored, and
the number of arguments passed to _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd is the maximum
value of _
\bd in _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd. The character `%' may be changed by
apply -2 cmp a1 b1 a2 b2 ...
compares the `a' files to the `b' files;
links all files in the current directory to the directory
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
Shell metacharacters in _
\bc_
\bo_
\bm_
\bm_
\ba_
\bn_
\bd may have bizarre effects; it
is best to enclose complicated commands in single quotes
There is no way to pass a literal `%2' if `%' is the argu-
ment expansion character.
Printed 7/9/88 April 29, 1985 1