xargs [command]

Execute a command with whitespace-delimited strings (from stdin) as arguments

Arguments

NameDescription
commandRun this program for each line of stdin (default: echo)

Options

NameDescription
-0Use NUL (0x00) as a separator, instead of whitespace
-E <command>Use this string as a logical EOF marker
-I <command>Replace occurrences of this string with the input
-J <command>Replace an argument exactly equal to this string with the input
-L <command>Run the program each time this many lines of input are read
-n <command>The maximum number of arguments that can be taken from stdin on each run
-oReopen stdin as /dev/tty (useful for running interactive applications)
-P <command>Run up to this many commands in parallel (as many as possible if 0)
-pPrompt to run each command
-rRun the command once if there's no input (compatible with GNU xargs)
-R <command>Specify the maximum number of occurrences that -I will replace
-S <command>Specify the maximum size in bytes that -I can use for replacements (default: 255)
-s <command>Maximum number of bytes that can be provided to the program (default: 4096)
-tEcho the command to stderr before it's executed
-xTerminal if the arguments will not fit in the maximum line length