xargs understand usage

The original has not understood the difference under linux shell xargs and pipes:

1, with a relatively wide duct in the linux shell, the pipe is often used to combine two or more commands together to complete a function;

     For example: we want to count how many lines there are certain documents:

     cat temp_subnet_172_2.txt | wc -l

     To accomplish this function, we use two commands, cat and wc, which are combined by the pipe, cat read the entire file, the command is piped to wc, wc receives input from the pipeline, is calculated.

     Now, with the pipe, then why have xargs it?

Guess you like

Origin www.cnblogs.com/freedh/p/12075623.html