In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Comm
Compare two sorted files line by line. The results are displayed in three columns: column 1 shows content that appears only in file1, column 2 shows content that appears only in file2, and column 3 shows content that appears at the same time. The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
1. Grammar
Comm [OPTION]... FILE1 FILE2
2. List of options
Option
Description
-- version
Display command version information
-- help
Show help documentation
-1
Do not display what appears in the first file
-2
Do not display the contents of the second file
-3
Do not display simultaneous content
-- check-order
Check that the input is sorted correctly, even if all input lines have been paired
-- nocheck-order
Do not check whether the input is sorted correctly
-- output-delimiter=STR
Use STR to split columns
3. Examples
1) Direct comparison
[root@localhost weijie] # diff-y 1.c 2.c / / View two files
Abc | abd
Def | efg
Ghi | ghi
[root@localhost weijie] # comm 1.c 2.c / / comparison, these two files must have been sorted
Abc
Abd
Def
Efg
Ghi
2) display only the contents common to the two files
[root@localhost weijie] # comm-12 1.c 2.c
Ghi
A Linux learning platform has been made, and a prototype has come out at present, which you can refer to and use.
Link: https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ password: n7bk
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.