Linux Command-grep for file text operations

Source: Internet
Author: User

Linux Command-grep for file text operations

File text operations

Grep

Search for text lines that meet the Regular Expression Conditions in the file

Cut

Intercepting specific fields in a file

Paste

Additional Field

Tr

Character conversion or compression

Sort

Adjust the order of text lines to conform to specific rules

Uniq

Duplicate text lines

Tee

Copy stdin to stdout and copy it to the file

Text operations are a good tool for Linux: through a series of conversions, the text files are converted into the desired form, and any program that can read stdin and write information to stdout is not out of this range, however, this is the most common and useful part.

Grep command

 

 

 

 

 

 

 

 

Advanced file operations

Awk, sed parser, m4, perl, python

Grep uses concise and Regular Expressions

Regular Expression usage

Assertion with Zero Width of a regular expression

Regular Expressions and file formatting commands in Linux (awk/grep/sed)

This article permanently updates the link address:

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.