How to use the diff3 command

Pubblicato il: 26 settembre 2024
sul canale di: InfoWorld
226
14

In this Linux tip, we’re going to look at the diff3 command. It’s similar to the diff command, but allows you to compare the contents of three text files instead of just two. In addition, the formatting of the output makes it easy to understand how the files are different.
In this command, we compare three simple text files:
$ diff3 file1 file2 file3
====3
1:1,3c
2:1,3c
Kids, the seven basic food
groups are gum, puff pastry,
pizza, pesticides, antibiotics,
3:1,3c
Kids, the six basic food
groups are fruits, vegetables,
grains, protein and dairy
The ====3 included in the output below means that the third file is different. If all the files were different, this would show just ====. The output then shows the differences between the first two files (which are the same) and the third which has a different third line.
Looking at file3, we can see a 4th line. This line didn’t show up in the diff3 output because it’s the same in all three files. The diff3 command only displays differences.

How to use the diff3 command+C2
https://www.networkworld.com/video/35...

7 ways to compare text files on Linux
https://www.networkworld.com/article/...

-----------------------------­---
SUBSCRIBE:    / @infoworld  
FACEBOOK:   / infoworld  
TWITTER:   / infoworld  
WEBSITE: https://www.infoworld.com/


In questa pagina del sito puoi guardare il video online How to use the diff3 command della durata di ore minuti seconda in buona qualità , che l'utente ha caricato InfoWorld 26 settembre 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 226 volte e gli è piaciuto 14 spettatori. Buona visione!