Linux Pipeline related instructions

Source: Internet
Author: User
Tags stdin

1. Pipeline command: line command with a "|" Indicates that the pipeline command can only handle the standard output information that is transmitted by the previous instruction, that is, the stdoutput information, and there is no direct processing power for standard error output information (stderr). The first data that is followed by each pipeline must be an instruction, and this instruction has to be able to accept Stdinput's data, such instructions can be used for pipeline instructions, for example: less,more,head,tail, etc. are acceptable stdinput Pipeline command, as for the LS, CP,MV is not a pipeline command, because LS,CP,MV does not accept data from stdin. Anyway:

1) The pipeline command will only process Standand output and will be ignored for stand error output

2) The pipeline command must be able to accept data from the previous instruction as standard input to continue processing.

2.cut-d Split character –f field–c character interval: Cut out a segment of the information, parameters:

1)-D: followed by the split character. Use with-f

2)-F: Divides a piece of information into segments based on the-D split character, and uses-F to remove the paragraph (the paragraph starts at 1).

3)-C: Remove the fixed character range in units of characters, denoted by "M-n" (contains m, not containing N).

The unit of the cut operation is the row, which can be understood as a loop that performs the specified action on each row, and eventually the dequeue data.

3.grep [-ACINV] [--color=auto]: Analyze a row of data, if there is anything I want, then the line is listed. Parameters:

1)-A: Search for data in binary files in text file mode

2)-C: Calculates the number of times the "search string" was found

3)-I: Ignores case differences, so case is considered the same

4)-N: Output line number by the way

5)-V: Reverse selection, which shows which line does not have a "search string"

6)--color=auto: You can add color display to the keywords you find.

4.sort [-fbmnrtuk] [file or stdin]: sort data, Parameters:

1)-F: Ignore case differences

2)-B: Ignores the first whitespace section

3)-M: Sort by the name of the month, such as JAN,DEC, etc.

4)-N: Use numbers to sort.

5)-R: Reverse Sort

6)-u:unique, the same data in the presence of a row

7)-T: delimiter, default Tab key to split

8)-K: which interval (filed) to sort, typically used in conjunction with-t

5.–uniq [-ic]: Show duplicate data only one, parameter

1)-I: Ignore case

2)-C: Counting

6.WC [-LWM] file or standard input: Statistics archive How many words, how many lines, how many characters, parameters:

1)-L: only travel;

2)-W: Only How many words are listed

3)-M: how many characters.

7.tee [-A] file: data is simultaneously split into files and screens. Parameters:

1) Write data to the file in append form


This article is from "Tiger Brother's Blog" blog, please be sure to keep this source http://7613577.blog.51cto.com/7603577/1595762

Linux Pipeline related instructions

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.