1. Pipeline commands
Pipeline commandThe operator is: "|". It can only process the correct output information sent from the previous command, but cannot directly process the error information. Then, pass it to the next command as the standard input.
Management command output description:
[Command 1] correct output, as the input of [command 2], and then the output of [command 2] as the input of [command 3, [command 3] The output is directly displayed on the screen.
The correct output of command 1 and command 2 after the pipeline is passed is not displayed on the screen
[Note ]:
1. Pipeline commands only process the correct output of the previous command, without handling the error output;
2. The command on the right of the pipeline command must be able to receive standard input stream commands;
Ii. Example
#1. Read the content of the logcat. Log File and forward it to grep through a pipeline as the input content
#2. Read the content of the logcat. Log File and forward it to grep as the input content through the pipeline. filter the rows containing 'displayed' and then forward the output content to the next grep as the input.
#3. Read the content of the logcat. log and wirelessqa. log files. The error content will be printed on the screen, and the correct content will be transmitted to grep through the pipeline
#4. Read the content of the logcat. log and wirelessqa. log files. The error content will be redirected to/dev/null, and the correct content will be transmitted to grep through the pipeline
#5. Read logcat. log and send it to LS through MPs queue. Because ls does not support standard input, the previously read data is lost.