In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about the introduction of pipeline commands in Linux, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
The Linux pipeline command is "|", which is used to connect multiple instructions. The output stream of the previous instruction will be used as the operation object of the latter instruction. The command format is "instruction 1 | instruction 2 | …" The latter instruction of the command must be able to receive standard input stream commands before it can be executed
The pipe command is used to connect multiple instructions, and the output flow of the previous instruction will be used as the operation object of the latter instruction.
The operator of the pipeline command is "|", which can only handle the correct output information from the previous instruction, but has no direct ability to deal with error information. It is then passed to the next instruction as the object of operation.
Basic format:
Instruction 1 | instruction 2 |...
The correct output of [instruction 1] is used as the input of [instruction 2], and then the output of [instruction 2] is used as the input of [instruction 3]. If [instruction 3] has an output, then the output will be displayed directly on the screen. After passing through the pipeline, the correct output of [instruction 1] and [instruction 2] is not displayed on the screen.
[reminder]:
The pipe command can only handle the correct output of the previous instruction, not the error output.
The latter instruction of the pipeline command must be able to receive standard input stream commands before it can be executed.
Use the example
1. Paging the details of the contents in the / etc directory
$ls-l / etc | more
2. Enter a string into a file
$echo "Hello World" | cat > hello.txt above is the introduction of pipeline commands in Linux. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.