如何忽略顺序合并/比较文件?

发布于 2024-07-11 04:59:19 字数 85 浏览 2 评论 0原文

我有两个不同的属性文件,我需要找到差异。 第二个文件按键排序。

有没有可以帮助我的工具? 据我所知,每个合并工具都非常关心顺序。

I have two properties files that are not the same and I need to find the differences. The second file is sorted by key.

Is there a tool that can help me with it? From what I've seen every merge tool cares very much about the order.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

扛起拖把扫天下 2024-07-18 04:59:19

我在 Linux 上的 bash 中通过对两个文件进行排序然后合并它们来完成此操作。 如果您使用的是 Windows,则可以安装 Cygwin 来运行 Linux 程序。

不过,我认为创建一个小程序来完成此操作是最好的选择,可能比学习使用 Cygwin 花费的时间更少。

编辑:您可以将其视为学习新技术的小项目。 我经常使用这样的项目来学习 Ruby 或 Python 之类的东西。 虽然如果是在工作中可能不会被接受。

I've done it in bash on Linux by sorting both files and then merge them. If you are on Windows you could install Cygwin for running Linux programs.

However, I think you are best served by creating a small program to do it, probably takes you less time than learning to use Cygwin.

Edit: You could look at it as a small project to learn a new technology. I often use projects like these to learn things like Ruby or Python. Although it may not be accepted if it is at work.

呢古 2024-07-18 04:59:19

对一个或两个文件进行排序。

然后运行“diff”。

Sort one or both files.

Then run "diff".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文