Introduction and use of cut commands in AIX

Source: Internet
Author: User
Introduction to cut commands in AIX and use cut to cut columns or fields from standard input or text files. command format: cut [options] file1file2options: www.2cto.com-clist: specify the number of cut characters-ffield: specify the number of cut fields-d: specify and space... introduction to cut commands in AIX and use cut to cut columns or fields from standard input or text files. command format: cut [options] file1 file2 options: www.2cto.com-c list: specify the number of cut characters-f field: specify the number of cut fields-d: specify the domain separator different from the space and tab key-c: Used to specify the cut range, such as-c1, 5-7: cut 1st characters, then drop 5 to the end 7 characters-c1-50: cut the first 50 characters-f domain-c same:-f1, 5: cut 1st domain, 5th domain-f1, 10-12: cut 1st domain, 10th domain to 12th domain www.2cto.com below is the exercise, pg pers.txt R. jone: Office Runner: ID897 S. round: UNIX admin: ID666 L. clip: Personal Chief: ID982 use ":" as the separator, cut 3rd fields: cut-d:-f3 pers.txt ID897 ID666 ID982 cut 1st and 3rd fields: cut-d: -f 1, 3, pers.txt R. jone: ID897 S. round: ID666 L. clip: ID982 www.2cto.com cut 2nd and 5th characters: cut-d:-c. 5 pers.txt. n. u. I cut 2nd to 6th characters cut-d:-c 2-6 pers.txt. jone. roun. clip -- the end --
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.