【发布时间】:2016-12-12 20:49:48
【问题描述】:
我想编写一些我可以在 bash 中运行的代码,它采用 URL 列表并检查它们是否返回 404。如果站点没有返回 404,我需要将 url 写入输出列表。
所以最后我应该有一个工作站点列表。 我不知道如何实现代码。 这看起来像是可以正常工作的东西?: How to check if a URL exists or returns 404 with Java?
【问题讨论】:
-
类似: if curl --output /dev/null --silent --head --fail "list of url's" then "write to example.txt"
标签: bash http url header http-status-code-404