xargs
Execute a command with piped arguments coming from another command, a file, etc. The input is treated as a single block of text and split into separate pieces on spaces, tabs, newlines, and end-of-file. See also: `parallel`.
More info →Options (5)
-n, --max-argsbooleanExecute a new command with each argument
{{arguments_source}} | xargs {{[-n|--max-args]}} 1 {{command}}-P, --max-procsbooleanRaise the parallel process limit to 10 (default is 1; 0 means as many processes as possible)
{{arguments_source}} | xargs {{[-P|--max-procs]}} 10 {{[-n|--max-args]}} {{1}} {{command}}-p, --interactivebooleanPrompt user for confirmation before executing command (confirm with `y` or `Y`)
{{arguments_source}} | xargs {{[-p|--interactive]}} {{command}}-a, --arg-filebooleanRead a file for arguments to be given to a command
xargs {{[-a|--arg-file]}} {{path/to/file}} {{command}}-o, --open-ttybooleanAllow the command to access the terminal for interactive input
{{arguments_source}} | xargs {{[-o|--open-tty]}} {{command}}Examples (8)
Run multiple chained commands on the input data
Raise the parallel process limit to 10 (default is 1; 0 means as many processes as possible)
Execute the command once for each input line, replacing any occurrences of the placeholder (here marked as `_`) with the input line
Prompt user for confirmation before executing command (confirm with `y` or `Y`)