linux - 使用 Linux 比较两个不同的 url

标签 linux diff

我是否能够比较两个不同的 url/网站,而无需首先使用 wget 或类似的东西先下载文件。我尝试了以下操作,但收到以下错误。

[root@desktop ~]# diff http://www.example.net/index.php http://www.example.com/index.php
diff: http://www.example.net/index.php: No such file or directory
diff: http://www.example.com/index.php: No such file or directory
[root@desktop ~]#

最佳答案

当然可以使用curl,虽然有点奇怪:

diff <(curl url1) <(curl url2)

在你的情况下:

diff <(curl http://www.example.net/index.php) <(curl http://www.example.com/index.php)

请注意,您可以使用 curl -s 进行更清晰的差异执行。

关于linux - 使用 Linux 比较两个不同的 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22632178/

相关文章:

php - 维基百科使用什么进行文本和修订差异

textarea - 比较两个不同 CodeMirror textarea 的变化

linux - 授予其他用户 git update 远程权限?

php - 当没有这样的文件时,什么 apache 配置导致 domain.com/index.php/abcdefg 工作?

c - apue代码第四章umask.c运行异常

c - 在启动 linux 时以编程方式启动应用程序

linux - systemd 服务器未启动

Git blob 数据和不同的信息

diff - 是否有任何开源二进制文件不同?

基于 SQL 的数据差异 : longest common subsequence