- Linux Shell Scripting Cookbook(Third Edition)
- Clif Flynt Sarath Lakshman Shantanu Tushar
- 120字
- 2021-07-09 19:46:26
Getting ready
The comm command is a utility to perform a comparison between two sorted files. It displays lines that are unique to file 1, file 2, and lines in both files. It has options to suppress one more column, making it easy to perform intersection and difference operations.
- Intersection: The intersection operation will print the lines the specified files have in common with one another
- Difference: The difference operation will print the lines the specified files contain and that are not the same in all of those files
- Set difference: The set difference operation will print the lines in file A that do not match those in all of the set of files specified (B plus C, for example)