XAPPLY(1)                                                            XAPPLY(1)



NAME
       xapply - extended apply and xargs replacement

SYNOPSIS
       xapply  -f  [-Adgmnsuvxz]  [-count]  [-a  c] [-e var=dicer] [-F script]
       [-i input] [-J tasks] [-N else] [-p pad] [-Pjobs] [-R req]  [-S  shell]
       [-t tags] [cmd] [files]
       xapply   [-Adgmnsuvx]  [-count]  [-a  c]  [-e  var=dicer]  [-F  script]
       [-i input] [-J tasks] [-N else] [-Pjobs] [-R req] [-S shell] [-t  tags]
       [cmd] [args]
       xapply -h
       xapply -H
       xapply -V

DESCRIPTION
       Extended  apply  is  intended  to  be  a  complete  replacement for the
       apply(1) and xargs(1) commands.  In the normal mode xapply emulates the
       best features of apply (substitutes limited percent escapes to form and
       execute shell commands).  Under -f it emulates a xargs-like  processor.

       Unlike  xargs  this  program deals in fixed argument lists.  Each posi-
       tional parameter (or input line) is treated as a  single  argument  for
       the expanded command (embedded blanks, tab, quotes and the like are not
       special).  If a variable argument list is required it may be built with
       fmt or adjust (or any other text processor) and passed in pre-formatted
       (see BUGS).

       The fixed argument list is built from a hunk of count  parameters  from
       the  command  line.   These parameters are usually interpreted as fixed
       strings, but under -f they are taken as  files  whose  lines  are  each
       taken sequentially as arguments.

       The  positional  parameter  cmd is the template command to control each
       task.  In this template each occurrence of the escape character c, per-
       cent  ("%")  by default, followed by a digit ([1-9]) is replaced by the
       current argument for that slot.  When no such  expansions  occur  in  a
       template  the  whole argument list is catenated on the end of cmd (pre-
       fixed by a blank when needed).

       The cmd is replaced by a script under -F.  The  contents  of  the  file
       script  replaces  the  literal  specification of a cmd template.  Under
       this option, xapply may be a  command  interpreter  for  the  specified
       shell  (see  -S  and  an  example  below).   The leading loader line is
       removed from the script, if it looks like a call to xapply.

       To extend this a bit we also allow curly braces to enclose larger inte-
       ger  value  (e.g.  %{15}) as make(1) does for macro names.  In addition
       the value zero (in either case)  is  taken  to  mean  no  expansion  is
       expected;  this suppresses the default catenation of the whole argument
       list as well.  The catenation of the whole list may be explicitly spec-
       ified via the index star ("*").  The last parameter may be specified by
       the index dollar-sign ("$").

       When the -f option is applied the name of  the  file  that  supplied  a
       parameter is available with %f followed by a specification.

       To  keep  up  with more complex structures the dicer form is allowed to
       extract subfields from input parameters:

            %[param separator field ...]

       The positional parameter param is broken into fields at  the  character
       separator.  The resultant field is then substituted, or diced again.  A
       negative field inverts this meaning by  removing  the  resultant  field
       from  the  original list.  The special field dollar-sign ("$") is taken
       as the last field.

       When a literal blank is used as the separator, it matches any number of
       white  space  characters.  The universal escape character backslash (\)
       may be used to quote any of blank, backslash,  close  bracket,  or  any
       digit  to suppress its special meaning.  Additional separator and field
       pairs may be used to further limit the expansion.

       The additional form %t selects a group of req  'resources',  which  are
       bound  to  a  running  task  for  the life of the process.  The list of
       resources must be indexed by slot (as params are), and may be the  data
       source  for  a dicer expression (e.g. %t[1/$]).  A as bonus %ft expands
       to the filename presented for tags, or the string "iota" when the orig-
       inal tags name cannot be recovered.

       The  special  form %u provides a sequential integer which is unique for
       each iteration of xapply's command processor.  This is useful  to  form
       unique  temporary  files,  to  read the output of the last iteration as
       input, or as a "loop counter".  It starts at zero.  In addition %u  may
       be  the  data  source for a dicer expression (e.g. %[u\0$]), but that's
       not really very useful.

       The special field selection star ("*") selects the  catenation  of  the
       selected arguments, be they tokens, filenames, or parameters.  This may
       also be used as the source for a dicer expression.

       For the unusual case where all that is not enough  power  the  form  %+
       shifts  the  values of %1, %2, ... to the left once to form a recursive
       expression treating the old %1 as a cmd.  After that expression expands
       processing  continues  with  the  rest  of  the  present template.  See
       hxmd(8L).

       As a concession to shell programmers an additional flag "q" is  allowed
       after  the  leading precent (as "%q") to quote the result of any expan-
       sion such that the shell quoting rules for double-quotes  produces  the
       expanded  text  exactly.   Each of double-quote ("""), backslash ("\"),
       grave accent ("'"), and dollar-sign ("$") are protected with  a  single
       backslash.

       Two  stronger versions of %q quote more of the shell meta character: %Q
       also quotes ~, *, ?, [, |, , &, ;, (, ), #, =, ', <, and >.   While  %W
       also  quotes  the default IFS charters (space, tab and newline).  These
       expanders protect the shell from meta characters in unsecure filenames.

       Enclose  any  of the above expressions in parenthesis to gain access to
       the mixer.

            %(dicer , mixer ...)

       This is a character-based expander,  the  characters  in  the  expanded
       string are numbered from 1 to $.  Any range may be selected for output.
       For example %([1 2],3) is replaced by the third character of the second
       word  in the first parameter.  To make %u more useful: the expansion of
       %(u,$) is the last digit of the counter, which is  the  counter  modulo
       10.   More  complete  documentation  on  the  mixer is available in the
       explode repository, or the mk(1) documentation.

TAGS
       Under any combination of -t, -R,  or  -J  xapply  wraps  itself  in  an
       instance of ptbw to manage resource allocation, unless tags indicates a
       reference to an enclosing manager.  For details on resource  processing
       see  ptbw(1L).  Note that xapply uses ptbw's itoa default (the integers
       from 0 to jobs-1) when none of ptbw options are  presented  (making  it
       transparent for other uses of ptbw).

OPTIONS
       Note that the option -F suppresses the positional parameter cmd by pro-
       viding its value from the specified script file.

       -count
              Each expanded command requires count of arguments.

       -A
              Emulate ptbw's -A option by appending the %t values on the shell
              argument  vector,  which  allows access to them as $1, $2, an so
              on.  On systems where csh(1) needs a pad argument, one ("_")  is
              inserted  before the token list, this padding is always provided
              for sh(1) and compatible shells (viz.  ksh(1)).   If  the  shell
              selected  is perl(1) the normal -c is replaced with -e.  Note in
              perl the values are presented as $ARGV[0], $ARGV[1]....

       -a c
              Change the escape character from percent (%) to c.

       -d
              Passed on to xclate(1l) to inhibit the publication of our master
              socket into the xclate environment chain.  To be sure this works
              the command must be called with $xcl_d  unset.   This  might  be
              used to isolate the use of -m, in some rare cases.

       -e var=dicer

       -e var
              Set the environment variable var to the expansion of dicer (with
              all the percent escapes supported  for  cmd)  for  each  process
              launched.   The  default dicer expression (when only var is pre-
              sented) is an expression to extract the next fixed parameter, in
              turn.

       -f
              Arguments are read one per line from the input files.  Each file
              is opened and scanned for arguments (which are only separated by
              newlines).   Note  that all references to the stdin ("-") stream
              share the stream: that is, arguments are taken round-robin  from
              each  active reference.  Files are hunked together by the -count
              option as fixed parameters would be.

       -F script
              The specified script is a file, replacing any literal  cmd  tem-
              plate.   Read  script  then  remove any leading loader line that
              matches a leading #! followed by our program name.  This  allows
              xapply  to  be used as an interpreter.  The markup %c expands to
              the command read from the file, %fc the name of the script file,
              and %tc the loader line from that file.

       -g
              Use  gtfw(1l)  to  get a global unique value for %u, rather than
              the internal local counter.  This  only  works  when  xapply  is
              wrapped  in  a  gtfw.  This also changes -N's xid from "00" to a
              unique number, prefixed with "0", as multiple parallel instances
              may have zero iterations.  Even without -f the specification %fu
              represents the source of the unique stream (hostname:diversion).
              Without  -g  that source is spelled "iota" (the integer sequence
              function).

       -h
              Print only a brief help message.

       -H
              Print a quick reminder of the available expander markup.

       -i input
              Under -f sub-tasks competing for input with xapply lead to  mad-
              ness.   Xapply opens all sub-tasks stdin to a shared stream from
              input.  Under -f this defaults to /dev/null.

       -n
              Do not execute commands, trace only, which implies -v.  When  %t
              is presented in cmd xapply might complain
                   %t used with -n, possible locking issues
              Because  the  output,  when  run in parallel, will not honor the
              semantics of -t (below).

       -m
              Untangle the output of parallel commands with the xclate  colla-
              tion  filter.  The xid passed to the xclate filter is the expan-
              sion of %1, or if that is the empty string the expansion of  %u.
              When  not already in a collated environment, xapply wraps itself
              in one.

       -J tasks
              Specify the number of tasks that ptbw should  accommodate  under
              this  entire  process  tree.  Unless -t prevents it, this switch
              forces an instance of ptbw(1L)  to  be  wrapped  around  xapply.
              When  the  number  of tasks is specified as zero the ptbw system
              default may be employed, making jobs the upper bound.

       -N else
              Launch the shell command else when no  cmd  would  be  launched,
              either  because args was empty or all of files were zero length.
              This is a trap for zero iterations of the loop.  The normal per-
              cent expansions for positional parameters are bound to the whole
              argument list, use an explicit "%0" to suppress  the  catenation
              of  these  parameters  to  else.   Also %t and %u work.  The xid
              passed to xclate is double-zero ("00"), so that  the  exit  code
              from the else may be processed out-of-band, if required.

       -p pad
              Files  with  inadequate  length  are  padded with this token, by
              default the empty string.

       -Pjobs
              Number of tasks to run in parallel.  Xapply  tries  to  keep  at
              most  jobs  processes  running  in parallel.  If the environment
              variable PARALLEL is set then it is read for  a  default  value.
              xapply waits for all tasks to finish before it exits.

       -R req
              The number of tokens allocated to each task, either from tags or
              from the default integer tableau.  The also forces a ptbw around
              the  xapply  process, unless -t prevents it.  There is a special
              case when req is specified as zero: the -R option is not  passed
              on to ptbw when started, and no tokens are allocated from it (in
              fact no tokens are available at all).

       -s
              Under this option when a task produces no output the xclate fil-
              ter  squeezes  out the existence of the command (no header, out-
              put, or horizontal footer).  This speeds the  task  stream  sub-
              stantially under -m, but only when a large fraction of the tasks
              produce no output and are evenly distributed between  the  tasks
              that produce output.

       -S shell
              Specify shell to run tasks under.  Xapply looks for the environ-
              ment variable SHELL or uses the built-in  default  /bin/sh.   In
              any  case  shell must take -c as sh(1) does, unless its basename
              contains the string perl, in which case it should take -e.

       -t tags
              The resources (tokens, targets, terms) read from tags create the
              tableau used by %t, and are controlled by an instance of ptbw.

              The  special  tags  name  dash  ("-")  is taken to imply that an
              existing instance of ptbw must  enclose  xapply.   An  alternate
              form  is  to  give  the  path to a ptbw (or ptbw-like) socket as
              tags.

       -u
              Use the value of %u as the xid sent to any xclate output filters
              under -m.

       -v
              Be verbose.  Echo shell commands to stdout.  This option is dep-
              recated, in light of -t.

       -V
              Show only  the  standerd  wrapper  version  banner.   This  also
              includes the ptbw protocol version expected.

       -x
              Echo processed commands to stderr as they are launched.

       -z
              Under  -f  read  input  files as if they were output from find's
              -print0 option.

ENVIRONMENT
       Always export any environment variable need by any descendant commands.
       For example the ksh script fragment:
              TEMP1=/tmp/mtf$$.$((RANDOM%100))
              mkdir $TEMP1
              xapply 'cp %1 $TEMP1/%1' $LIST
       may  expand  $TEMP1  to the empty string, as the expanding shell is not
       the script, but a new one started by xapply.  To make the script  func-
       tion as (I) intended, either export $TEMP1 before the xapply with
              export TEMP1
       or use double, rather than single, quotes around the cmd.

       The  -e  option allows descendant xclate output management processes to
       see more data than they otherwise could.  Using the dicer to produce  a
       more informative $XCLATE itself, or, by reference, in some variable via
       xclate's %{env} expansion might expand under the -T and -H options.

       $XAPPLY_WRAP
              Used by xapply in the wrapping of itself in a ptbw.  This  vari-
              able should be avoided.

       $SHELL
              Setting  this  to an uncommon value may cause poorly formed xap-
              ply's in descendant processes to fail.  Always use -S explicitly
              to  set  the  shell  to something other than a Bourne compatible
              shell.

       $PARALLEL
              The default value for -P, when specified without a number.

EXAMPLES
       xapply 'cd %1 && make all' */
              Change context to each directory in  the  current  directory  in
              turn and run "make all".

       xapply '[ -f %1/Makefile ] && cd %1 && make all' */
              As above, skipping any directory without a "Makefile".

       xapply 'grep -l target %1 >/dev/null || echo %1' *.html
              List all the HTML files which do not contain the pattern target.
              This emulates grep(1)'s -L option, when it is not supported.

       xapply -f 'diff %1 ../version5/%1' manifest | more
              Compare the files listed in manifest from the current  directory
              to the versions with the same name in ../version5.

       xapply -p/dev/null -f -2 'diff %1 %2' manifest1 checklist1
              Compare  (with  diff(1)) each file in manifest1 to the same file
              in checklist1.  Substitute /dev/null for missing  files  on  the
              end.   {This is only useful if the input files are known to have
              the arguments in a stable order.}

       xapply 'indent' *.c
              Run indent(1) for each C source file in the current directory.

       yes | xapply -f 'echo "%q1"; sleep 1' -
              Put a 1 second delay between yes(1)'s affirmations.

       find ~ksb/bin -type f ! -perm -111 -print | xapply -fx 'chmod a+x' -
              Find plain files in my bin which are not executable by all,  let
              xapply try to fix each (and show me the progress).

       find */ -... | fmt 960 1024 | xapply -f -i /dev/tty 'vi' -
              Run  vi(1) on blocks of files from the find command.  This is so
              clever.

       find ... | xapply -f -5 -i /dev/tty 'vi' - - - - -
              Edit five files at a time (until the last edit).

       xapply -fn "" /etc/passwd
              A slower version of cat(1).

       tr ':' '\012' < /etc/passwd | xapply -7 -nf 'chown %1 %6' - - - - - - -
              Shows one way to get the fields of the password file into xapply
              escapes.

       xapply -nf 'chown %[1:1] %[1:6]' /etc/passwd
              A simpler way to get the same password information.

       xapply -V
              Output xapply's version information.

       xapply '[ -d %1/RCS ] || echo %1' */
              Output each subdirectory that does not have an RCS cache.

       xapply -f '[ -f %1 ] && echo %1' List | ...
              Output  the  pathnames  from List that presently exist (note the
              inverse could be accomplished as well with || rather than &&).

       find . -name \*.core -print0 |xapply -fzx 'cd %[1/$] && mv core /crash/core.%u' -
              Locate core files, chdir into the  target  directory,  move  the
              core to a (fictional) /crash directory with a uniq extender.

       xapply -n -f -2 '%2' - -
              Output only the even lines from stdin (use '%1' rather than '%2'
              for the odd lines, use '' to join pairs of lines.)   Often  used
              in  combination with sed(1) to join stanza files, like AIX uses,
              into something we can process.

       jot 999 2 |xapply -f 'set @ 'factor %1' && [ $# -eq 3 ] && echo %1' -
              Output all 168 prime numbers from 2 to 999 (be  sure  /usr/games
              is in $PATH).

       xapply -n -4 '(%+)' "one.%2" two three four
              Outputs  "(one.three)".  The %+ expander is magic, when you need
              it.  Use with care, as the old %1 may be tainted.

       xapply -x -P4 'ppp -unit%t1 %1' $LIST
              Run to start ppp(1) up to 4 sessions explicitly on tun(4)  units
              (0, 1, 2, and 3), as each finishes another from the list will be
              started on the newly available tun device.

       xapply -f -P8 -t openif.ct 'iftester %t[1] %[1]' nets.cl
              Given openif.ct has a list of open interfaces (e.g. fxp1,  bge0,
              xl0)  and  nets.cl has a list of networks to test, the fictional
              iftested program runs once for each network, each time  with  an
              available interface.

       xapply -f -P8 'iftester $IF%t1 %1' nets.cl
              Use  the environment variables $IF0, $IF1... to replace the file
              openif.ct above.  This assumes there are at least 8  such  vari-
              ables  exported  to  the subshells, so the use of ${IF%{t}:?...}
              might be wise here.

       xapply -e C1=%1 -e C2=%2 -f -2 '%0diff $C1 $C2' list1 list2
              Avoid using the dicer, in favor of  using  the  shell.   The  %0
              expansion turns off the auto-append of %*.

       xapply -e C1 -e C2 -f -2 '%0diff $C1 $C2' list1 list2
              Shorthand for the command above.

       xapply -fA -R2 -P4 -t $HOME/lib/service.cl 'mystery $1 %1 $2' -
              Launch at most 4 copies of the mystery program over the elements
              from stdin with 2 resources selected  from  $HOME/lib/service.cl
              This  might be constrained by the count of the lines in the ser-
              vices.cl file, or the limit of 4 given to -P or  the  number  of
              input line from stdin, which ever is smaller.

       xapply -fR2 -P4 -t $HOME/lib/service.cl 'mystery %t1 %1 %t2' -
              The same command, without the -A indirection.

       ptbw -m -t /etc/motd xapply -t - 'echo %ft' ""
              Notice  that  the  xapply  instance is not given the name of the
              token file (/etc/motd). It is a little surprising that  it  out-
              puts the correct path, but it does.

       xapply -N '%0echo Nothing to compress.' 'gzip' $FILES
              Compress  all  of  $FILES,  or complain there were none.  The %0
              suppresses the catenation of any positional parameters,  and  is
              only  really  needed  under  -f,  but  is  always  good style to
              include.

       find ... -print0 |xapply -fz 'echo "gzip %q1" >/var/run/fifo' -
              Protect the command stream on input  with  the  zero  separator,
              then on output with the quote expansion.  Thus files with a new-
              line, dollar, or double-quote in their name will be passed  lit-
              erally to the fifo consumer process.

       find ... -ls | sed -e 's/^ *//' | xapply -f '...' -
              The  output  of find right justifies the block count, which adds
              leading spaces to small files.  We strip off that white-space to
              allow  the  dicer  to  access the "ls -dgils" fields.  Note that
              device files will require more filtering.

       xapply -f 'echo "%q(1,$-1)"' -
              Use the mixer to reverse the character in each line of stdin  to
              stdout.

       xapply -nf '%(1,$-1)' -
              A  much  faster  version  of the previous example, which doesn't
              spawn at least one process per line, just to run echo(1).

       find ... -print0 | binpack -zN long-process | xapply -P10 -f '' -
              Use the local binpack utility to pack files into very long argu-
              ment  vectors  (close  to  KERN_ARGMAX), then run 10 of those in
              parallel.  This is a great way to process very  large  searches,
              rather than creating a grep process per file.  Note that binpack
              does permute the order of the files quite a bit.  The  long-pro-
              cess might be something as simple as a grep command.

       xapply -xfP 'ssh -n %1 \~/bin/poll-host >/tmp/$USER.1/%1 2>&1' host.cl
              Use  $PARALLEL  as the parallel factor to visit all the hosts in
              hosts.cl.  Run the remote "poll-host" command  with  stdout  and
              stderr  both  redirected  to  a local files named for each host.
              Post-processing of these output files reveals the status of each
              host  (via  grep filters, size filters, or even the execution of
              the resultant file).  This is the on-ramp to hxmd.

       id | xapply -f -n '%[1 $=2,@(1]' -
              Output the list of numeric groups for the current session.  This
              uses the dicer's list markup (via @), which is only explained in
              the dicer documentation.  See the names with '%[1 $=2,@(2)1]'.

              Read the example dicers as "first parameter  broken  on  spaces,
              take  the last field, broken on '=' take the second field, split
              on comma apply a split on open paren to merge the  first  fields
              into the result".  In the alternate "..., split on comma apply a
              split on open paren take the second field split on  close  paren
              taking the first field to merge into the result".

       #!/usr/bin/env -S xapply -P -F
              An  example interpreter line to process a script through xapply.
              The script uses markup to expand  the  parameters,  as  any  cmd
              would,  and  options  to  xapply may be presented as part of the
              command.  Note that the  name  of  the  script  is  appended  by
              execve(2).  Also note that this usually puts the contents of the
              file in the process table, so don't include any private data  in
              such  a  file.   (Sadly, only BSD versions of env(1) have the -S
              option.)

       xapply 'echo cmd=\"%Qc\" loader=\"%Qtc\" script=\"%Qfc\"%0' 1
              An example of the values bound for script execution: output cmd,
              the  current default shell as an interpreter line, and the token
              command-line.

SHORT CIRCUIT
       The xapply loop may be short circuited by sending a  USR1  signal  (see
       kill(1))  to the xapply process itself.  To that end the expander %p is
       replaced by the appropriate process-id.  Any task that is already  run-
       ning  is  allowed to complete, but no new tasks will be launched.  This
       is almost always used in processes that are matching sets  of  elements
       against some automated search criteria.

       Xapply  does  consume  the  rest  of the input data to prevent a broken
       pipe.  It also opens a channel to  xclate  if  the  output  is  managed
       (under  -m) to add a notification of "completion" for each elided task.
       Such a notification never includes the exit code (which didn't happen),
       just  the  xid.   Under  -x a trace of the elided process's xid is dis-
       played on stderr.

       In the example below no even numbers are displayed:
              xapply '[ %1 -eq 2 ] && kill -USR1 %p || echo %1' 3 1 2 4
       The 2 is removed by the execution of the kill command, while the  4  is
       removed  by  having  never been launched.  Adding -P5 may allow the 4th
       iteration to launch, because the kill  process  is  racing  the  xapply
       loop.

       To see the exit code list replace "xapply" above with a new prefix:
              xclate -m -rN'>res' xapply -m
       This  creates  a  file  named "res" with the notification stream in it.
       Display that with:
              tr '\000' '\n' <res
       The output shows that 3 tasks have exit statuses of "0"  and  the  last
       has none.
              0,3
              0,1
              0,2
              4
       Hxmd(8l)  and  other  processors built on top of xapply can distinguish
       between failure exit codes and the short circuit of a launch.  In fact,
       hxmd maps the non-launch of a command to the pseudo-code 3000.

BUGS
       The  interaction  between  -t  and  -P is odd, in that the number of %t
       resources limits the parallel factor.  The "minimum rule" is not really
       a bug as one might use:
              ptbw -t tags | sed -e 1,3d | wc -l
       to count the lines in tags.  Then apply the result under -P, if you are
       certain that will not run too many parallel tasks.

       Given that req tokens are required to run a task,  it  is  possible  to
       have  too  few tokens to run even a single task.  This is not as much a
       bug as a feature, xapply will exit with failure code  DATAERR  (65)  in
       this case.

       A worse issue is the use of %t and -n when the output is later executed
       in parallel.  The semantics of %t are only maintained when xapply keeps
       track  of  the running tasks: when another processor launches the tasks
       there is no way for it to knows which strings represent  the  expansion
       of %t.

       There  is  no  access to ptbw's -depth option for -t.  As a work around
       one might use a specification of the  controlling  socket  through  the
       clues  ptbw  leaves in the environment, this assumes $DEPTH is set to a
       small integer:
              eval PTBW_SOCK=\${ptbw_'expr $ptbw_link - $DEPTH'}
              xapply -t ${PTBW_SOCK:?"too shallow"} ...

       Under -f in the context of an else  command  the  parameter  markup  is
       bound  to  the  list  of  files  presented  (all  of which must be zero
       length).  The catenation of this list to the else command  was  dropped
       by some older versions of xapply: that was a bug, not a feature.

       It  is  not  possible  to specify the -z option to ptbw from the xapply
       command-line.  Start the ptbw instance as a wrapped prefix around  xap-
       ply, then specify -t as "-".

       The case conversion escapes from oue(1l) might be useful here.

       This  program  may  not even compile without xclate(1) installed in the
       builder's search path.  At run time -m fails when either xclate or ptbw
       are  required  and  not  installed  (with  a  file not found error from
       execve(2)).

       Should have a filter buddy that knows xargs's input rules to convert  a
       input  stream  to  our style.  But then again who uses the broken xargs
       quoting rules?

       Modern fmt is too smart and won't work on file names  that  start  with
       dot (it thinks they are nroff directives).  This crosses that fine line
       I always talk about.  One can use a sed filter, viz.
              sed -e 's,^\.//*,,' | fmt ...
       to repair the damage for list of files (the output of find).

       The first version of %t was  slightly  incompatible  with  the  present
       implementation (in version 3.19).

       The fact that under -t - the expansion of %ft reports the correct file-
       name (given to the enclosing ptbw) should be taken as a feature, not  a
       bug.   The  reason the name "iota" is presented as the default (for %ft
       and %fu) is unclear to everyone, but the author and other FP, J, or APL
       programmers.

       The  interaction  between  mk(1l)  markup and xapply markup in a script
       interpreted by xapply is not pretty.  Removing marked  lines  from  any
       marked  comments  in the source file before installation is a very good
       idea.

       The fact this doesn't produce the expected output is not a bug in  xap-
       ply:
            xapply 'echo sleep %1> job%u' 1 3 5 7 9 3 4
       The  shell is parsing 1> (3>, 5>...) as requests to redirect the speci-
       fied descriptor.  Take extra care with spaces and quotes to avoid  such
       issues.

AUTHOR
       K S Braunsdorf, from the Non-Player Character Guild
       xapply at-not-a-spammer ksb dot npcguild.org

SEE ALSO
       sh(1),  cat(1),  xclate(1l),  ptbw(1l),  apply(1),  xargs(1), hxmd(8l),
       mk(1l) fmt(1) or adjust(1), make(1), find(1), sed(1), ppp(8),  perl(1),
       execve(2), env(1), binpack(1l), wc(1)



                                     LOCAL                           XAPPLY(1)

NAME | SYNOPSIS | DESCRIPTION | TAGS | OPTIONS | ENVIRONMENT | EXAMPLES | SHORT CIRCUIT | BUGS | AUTHOR | SEE ALSO