home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / doc / xargs.man < prev    next >
Text File  |  1993-06-13  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. XARGS(1L)                                               XARGS(1L)
  5.  
  6.  
  7. NAME
  8.        xargs  -  build  and  execute  command lines from standard
  9.        input
  10.  
  11. SYNOPSIS
  12.        xargs [-0prtx]  [-e[eof-str]]  [-i[replace-str]]  [-l[max-
  13.        lines]]   [-n  max-args]  [-s  max-chars]  [-P  max-procs]
  14.        [--null]    [--eof[=eof-str]]    [--replace[=replace-str]]
  15.        [--max-lines[=max-lines]]      [--interactive]     [--max-
  16.        chars=max-chars]  [--verbose]  [--exit]  [--max-procs=max-
  17.        procs]  [--max-args=max-args] [--no-run-if-empty] [command
  18.        [initial-arguments]]
  19.  
  20. DESCRIPTION
  21.        This manual page  documents  the  GNU  version  of  xargs.
  22.        xargs  reads  arguments from the standard input, delimited
  23.        by blanks (which can be protected with  double  or  single
  24.        quotes  or a backslash) or newlines, and executes the com-
  25.        mand (default is /bin/echo) one or  more  times  with  any
  26.        initial-arguments followed by arguments read from standard
  27.        input.  Blank lines on the standard input are ignored.
  28.  
  29.        xargs exits with the following status:
  30.        0 if it succeeds
  31.        123 if any invocation of the command exited with status 1-125
  32.        124 if the command exited with status 255
  33.        125 if the command is killed by a signal
  34.        126 if the command cannot be run
  35.        127 if the command is not found
  36.        1 if some other error occurred.
  37.  
  38.    OPTIONS
  39.        --null, -0
  40.               Input filenames are terminated by a null  character
  41.               instead  of by whitespace, and the quotes and back-
  42.               slash are not special  (every  character  is  taken
  43.               literally).   However,  any  end  of file string is
  44.               still recognized.  Useful with the GNU find -print0
  45.               option  when  filenames  might contain white space,
  46.               quote marks, or backslashes.
  47.  
  48.        --eof[=eof-str], -e[eof-str]
  49.               Set the end of file string to eof-str.  If the  end
  50.               of  file string occurs as a line of input, the rest
  51.               of the input is ignored.  If  eof-str  is  omitted,
  52.               there  is no end of file string.  If this option is
  53.               not given, the end of file string defaults to  "_".
  54.  
  55.        --replace[=replace-str], -i[replace-str]
  56.               Replace  occurences  of  replace-str in the initial
  57.               arguments with names read from standard input.   If
  58.               replace-str  is  omitted, it defaults to "{}" (like
  59.               for `find -exec').  Implies -x and -l 1.
  60.  
  61.  
  62.  
  63.  
  64.                                                                 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XARGS(1L)                                               XARGS(1L)
  71.  
  72.  
  73.        --max-lines[=max-lines], -l[max-lines]
  74.               Use at most max-lines nonblank input lines per com-
  75.               mand  line;  max-lines  defaults  to  1 if omitted.
  76.               Trailing blanks cause an input line to be logically
  77.               continued on the next input line.  Implies -x.
  78.  
  79.        --max-args=max-args, -n max-args
  80.               Use  at  most  max-args arguments per command line.
  81.               Fewer than max-args arguments will be used  if  the
  82.               size (see the -s option) is exceeded, unless the -x
  83.               option is given, in which case xargs will exit.
  84.  
  85.        --interactive, -p
  86.               Prompt the user about whether to run  each  command
  87.               line  and  read a line from the terminal.  Only run
  88.               the command line if the response starts with `y' or
  89.               `Y'.  Implies -t.
  90.  
  91.        --no-run-if-empty, -r
  92.               If  the  standard  input  does not contain any non-
  93.               blanks, do not run the command.  Normally, the com-
  94.               mand is run once even if there is no input.
  95.  
  96.        --max-chars=max-chars, -s max-chars
  97.               Use  at most max-chars characters per command line,
  98.               including the command and initial  arguments.   The
  99.               default  is as large as possible, up to 20k charac-
  100.               ters.
  101.  
  102.        --verbose, -t
  103.               Print the command line on the standard error output
  104.               before executing it.
  105.  
  106.        --exit, -x
  107.               Exit if the size (see the -s option) is exceeded.
  108.  
  109.        --max-procs=max-procs, -P max-procs
  110.               Run  up  to  max-procs  processes  at  a  time; the
  111.               default is 1.  If max-procs is 0, xargs will run as
  112.               many  processes  as possible at a time.  Use the -n
  113.               option with -P; otherwise chances are that only one
  114.               exec will be done.
  115.  
  116.        The  long-named options can be introduced with `+' as well
  117.        as `--', for compatibility with previous releases.   Even-
  118.        tually  support  for  `+'  will  be removed, because it is
  119.        incompatible with the POSIX.2 standard.
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                                                 2
  131.  
  132.  
  133.