Linux Text Processing commands

Source: Internet
Author: User

1. Cat:concatnate

Options:

-n:number Display Line numbers

-e:end displays the identifier at the end of each line (the identifier at the end of each line in Linux is $, and $+ returns in Windows)

-v:visible visible display of nonprinting characters

2. MORE:

3. Less:

4 head: Show from scratch

-n Specifies the number of rows

5. Tail: View the file trailer

-f:fllow View the end of the file, do not exit wait for subsequent append to this file new content


6. Cut: Modify the contents of the file to output

-d:delimiter Specifying a separator

-f:filed Specifying fields

-b:byte Split by Byte

-c:characters Split by character


7. Sort: By default according to Ascⅱ code sorted by character from left to right

Options:

-n:number Sorting by value

-r:resort

-t:trainsition Setting a separator

-K:KEY specifies which field to sort the keyword with-t

-u:unique the same row is displayed only once (the same row as the same row)

-f:fold (folded, shrouded) ignoring case

-c:count shows the number of duplicate rows

-d:double Show only Duplicate rows


8. Wc:word Count

Options:

-l:line shows only the number of rows

-c:bytes count shows only the number of bytes

-w:word number of words

-M: Displays only the number of characters

-L: The longest line contains the number of characters


9. tr:trainsition Remove to convert or delete characters

Options:

-d:delete

EX:TR AB AB Replacement AB (each corresponding to the replacement)

TR A-Z




Linux Text Processing commands

Related Article

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.