sam
sam

Reputation: 405

comparing the contents of more than three files in linux

In Linux to compare the contents of two text files or three I've diff & diff3 command.

But what if I need to compare more than 3 files at a time??

Upvotes: 0

Views: 249

Answers (1)

Mitchbcn
Mitchbcn

Reputation: 71

You can do a simple script to compare all the files that you want.

Example:

In directory that contains all files

for i in `ls | grep -v [file_want_compare]` ; do diff [file_want_compare] $i; done

Upvotes: 1

Related Questions