Linux command line pipeline

Source: Internet
Author: User
Tags command line regular expression stdin linux

The pipe operator "|"can send the standard output of a command (stdout)to the standard input (stdin) of another command.

Filters (Filter)is the combination of multiple commands to form a pipe.

Main commands:

Sort : sorting;

Uniq, UNIQue, Output no duplicate rows of data; Parameter "-D", you can output duplicate rows;

WC, Word statistics (word count); The parameter "-L" only counts rows;

grep, output matching mode, global Regular ExpressionPrint, global regular expression printing;

As shown in figure:

Head , the first few lines of the output file, the default 10 lines; Parameter "-n", specifying the number of rows;

tail, the output file at the end of a few lines, default 10 lines; Parameter "-n", specifying the number of rows; "-F", real time (real-time) displays the end of the file information.

Tee, which reads standard input (stdin)and outputs it to standard output (stdout) or files (file) ;

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.