且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Bash目录排序问题 - 删除重复行?

更新时间:2023-12-05 19:12:58


看到它没有从
2.txt中删除重复的ABC行,当它也在1.txt中找到。每个文件中的所有行都应该保持唯一,所有重复的内容都应该被删除。

As you can see it's not removing the duplicate "A B C" lines from 2.txt when it's also found in 1.txt. All lines in each file should remain unique and all duplicates should be removed.

您可以通过将7171u的答案应用于其他问题 Unix Bash从目录文件中删除重复的行?到上面的命令的结果(更改 tmp / * 在他的脚本到 app / * ,这应该是微不足道的)。

You can accomplish this goal by applying 7171u's answer to your other question "Unix Bash Remove Duplicate Lines From Directory Files?" to the result of your command above (after having changed the tmp/* in his script to app/*, which should be trivial).