Linux: Wonderful use of the-comm command and the comm command

Source: Internet
Author: User

Linux: Wonderful use of the-comm command and the comm command
Parameter: // assume a, B, and AB intersection # comm [options] textA textBoptions: 1. This indicates that a removes the overlapping AB intersection; 2. indicates that B sets remove the AB overlapping part; 3. indicates that AB intersection overlaps the part; ------------------------------------1 indicates that a sets remove the AB overlapping part ), the remaining B sets; the value-2 indicates that the B sets are removed (excluding the AB overlapping part of the B sets), and the value-3 indicates that the AB overlapping part is removed;

So push down;

####################################

Application scenarios:

File a content: file B content

1 2

2 3

3 4

4 5

It can be seen that the overlapping parts of file a and file B are 2, 3, and 4.

Comm-12 a B

Result: 2, 3, and 4

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.