morpheus-base

morpheus base system
git clone git://git.2f30.org/morpheus-base.git
Log | Files | Refs

xargs.1 (1815B)


      1 .TH XARGS 1 sbase\-VERSION
      2 .SH NAME
      3 xargs \- constuct argument list(s) and execute command
      4 .SH SYNOPSIS
      5 .B xargs
      6 .RB [\-n
      7 .IR maxargs ]
      8 .RB [ \-r ]
      9 .RB [ \-E
     10 .IR eofstr ]
     11 .RI [ cmd
     12 .IR [arg... ] ]
     13 .SH DESCRIPTION
     14 xargs reads space, tab, newline and EOF delimited strings from stdin
     15 and executes the specified cmd with the strings as arguments.
     16 
     17 Any arguments specified on the command line are given to the command upon
     18 each invocation, followed by some number of the arguments read from
     19 stdin.  The command is repeatedly executed one or more times until stdin
     20 is exhausted.
     21 
     22 Spaces, tabs and newlines may be embedded in arguments using single (`'')
     23 or double (`"') quotes or backslashes ('\\').  Single quotes escape all
     24 non-single quote characters, excluding newlines, up to the matching single
     25 quote.  Double quotes escape all non-double quote characters, excluding
     26 newlines, up to the matching double quote.  Any single character, including
     27 newlines, may be escaped by a backslash.
     28 .SH OPTIONS
     29 .TP
     30 .B \-n maxargs
     31 Use at most maxargs arguments per command line.
     32 .TP
     33 .BI \-r
     34 Do not run the command if there are no arguments.  Normally the command is
     35 executed at least once even if there are no arguments.
     36 .TP
     37 .B \-E eofstr
     38 Use eofstr as a logical EOF marker.
     39 .SH EXIT STATUS
     40 xargs exits with one of the following values:
     41 
     42            0       All invocations of command returned a zero exit
     43                    status.
     44            123     One or more invocations of command returned a
     45                    nonzero exit status.
     46            124     The command exited with a 255 exit status.
     47            125     The command was killed or stopped by a signal.
     48            126     The command was found but could not be executed.
     49            127     The command could not be found.
     50            1       Some other error occurred.