Using xargs

Learn how to use xargs to use data from standard input as an argument for other functions.

The xargs command

The xargs program takes data from standard input and lets us use it as an argument to another program. Let’s do something incredibly trivial to understand how it works: print out the numbers 1 to 5 with echo, using xargs. We use the seq command, which prints out a sequence of numbers, each on its own line.

 ...