Pipe symbol "|" in Linux The role
Command format: command a| command b, which is the correct output of command 1 as the operand of command B (apply someone else's picture)
1. For example: PS aux | grep "Test" looks for test in the results of PS aux.
2. For example: Find. -name "*.txt" | Xargs grep "Good"-n--color=auto the results of find as parameters into grep, which is the search for good keywords inside those files.
Note: In this example, Xargs splits the long list of files created by find into multiple substrings,
such as "" Find/path-type f-print0 | xargs-0 RM
Xargs splits the long list of files created by find into multiple substrings, and then calls the RM for each substring Xargs may be mistaken, and if you need to handle special characters, you need to use the-0 parameter for processing.
option Explanation
-0: When Sdtin contains special characters, think of it as a general character, like/' space ', etc.
Pipe symbol "|" in Linux The role