Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use Shell to calculate file intersection, union and subtraction

Shulou Source: shulou.com Published: 2022-06-01 16:34:02 10月14日 Update

This article mainly explains "how to use Shell to calculate file intersection, union and difference set", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use Shell to calculate file intersection, and set and difference" bar!

File a.txt

Ac13d4

B.txt

Abe215 Computation Union sort-u a.txt b.txt12345abcde Computation intersection grep-F-f a.txt b.txt | sort | uniq1a Computation difference set

AWhat b

Grep-F-v-f b.txt a.txt | sort | uniq34cd

BMYA

Grep-F-v-f a.txt b.txt | sort | uniq25be Thank you for your reading, the above is the content of "how to use Shell to calculate file intersection, union and difference". After the study of this article, I believe you have a deeper understanding of how to use Shell to calculate file intersection, union and difference, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Intersection subtraction files learning content that is ideas situations articles more knowledge knowledge points articles follow questions practice push research verification Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Microsoft Linux Shulou Tech Info Shulou Technology