Linux Cut command

Source: Internet
Author: User

1 basic data unit for Cut command processing

As with most text processing tools, cut is also based on the behavior of the basic data unit.

2 use of the Cut command

Gu Mings, cut is to cut out the rows to meet the conditions of the data, the return is to meet the criteria of the data.

3 Cut's Way

Thursday, August 11, 2011 20:44:52 EDT

3.1 in bytes cut

In bytes, the bytes are numbered starting at 1.

Date |cut-b 1-4------2011

3.2 With the character cut

The characters are divided in units of characters, numbering starts at 1.

Date |cut-c 1-5------2011

3.3 with domain cut

There is a delimiter that divides the rows into sections, each of which is called a field that is numbered starting at 1.

HEAD-N5/ETC/PASSWD |cut-d:-F 1,3-5

-D indicates the delimiter,-F for cut positioning.

Linux Cut command

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.