我是否能够比较两个不同的 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/