Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Linux 中比较两个或三个文本文件的内容我有diff & diff3命令。
但是,如果我需要一次比较3 个以上的文件怎么办?
您可以编写一个简单的脚本来比较您想要的所有文件。
例子:
在包含所有文件的目录中
for i in `ls | grep -v [file_want_compare]` ; do diff [file_want_compare] $i; done