Understand sort and uniq commands (including uniq's-u and-d options)

Source: Internet
Author: User
Understand sort and uniq commands (including uniq's-u and-d options) [plain] catab | sort | uniq & gt; c # cisaunionb union set catab | sort | uniq-d & gt; c # cisaintersectb intersection cat... understand sort and uniq commands (including uniq's-u and-d options) [plain] cat a B | sort | uniq> c # c is a union B union cat a B | sort | uniq-d> c # c is a intersect B intersection cat a B B | sort | uniq-u> c # c is set difference a-B difference set view the content of file a B [root @ hadoop luanshous#] # cat a B LUAN SHOU SHEN 1111 2222 3333 luan kevin 1234 1111 use-c cat a B | sort | uniq-c 2 1111 1 1234 1 2222 1 3333 1 KEVIN 3 LUAN 2 SHEN 2 SHOU cat a B | sort | uniq // Union 1111 1234 2222 3333 kevin luan shen shou cat a B | sort | uniq-d // intersection 1111 luan shen shou cat a B | sort | uniq-u // difference set 1234 2222 3333 KEVIN

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.