Linux Text Processing command--cut

Source: Internet
Author: User

Cut action and usage:

Cut [-option] file name

Cut-remove sections from all line of files

Cut a piece of content from each line of a file

-D: Specify the field delimiter, the default delimiter is a space

-F: Specify the fields to display

-f1,3 showing 1 and 3 segments

-f1-3 Show from 1 to 3 segments, i.e.

[Email protected] test]# cut-d:-f1,3/etc/passwd

root:0

Bin:1

Daemon:2

Adm:3

Lp:4

Sync:5

Shutdown:6

[Email protected] test]# cut-d:-f1-3/etc/passwd

root:x:0

Bin:x:1

Daemon:x:2

Adm:x:3

Lp:x:4

Sync:x:5

Shutdown:x:6


This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1859321

Linux Text Processing command--cut

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.