OnCallReady

Commands

xargs - build and execute command lines from standard input

xargs [-n N] [-I STR] [-0] [-r] [-P N] command

Options you will use

-n N
Use at most N arguments per command line.
-I STR
Replace STR with the input line; implies one line per command.
-0, --null
Input items are NUL-separated. Pairs with find -print0 and survives spaces in names.
-r, --no-run-if-empty
Do not run the command if the input is empty.
-P N
Run up to N commands in parallel.
-I REPLACE
Run the command once per input line, putting the line where REPLACE ({} usually) appears.
-t, --verbose
Print each command line before running it.
-0, --null
Input items end with NUL, not whitespace (pairs with find -print0).
-n MAX_ARGS
At most MAX_ARGS arguments per command line.
-P MAX_PROCS
Run up to MAX_PROCS commands at once.

Examples

$ find . -name "*.log" -print0 | xargs -0 rm

safe with spaces

$ cat hosts | xargs -I{} ssh {} uptime

one run per line

Try xargs in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.