bash - 在 bash 中获取像 200 这样的 Curl 返回代码

他们提出了一种简单的方法来只获取下一个命令的代码:

curl -s -o /dev/null -I -w "%{http_code}" http://www.example.org/

 

posted @ 2023-09-19 09:49  浅笑19  阅读(55)  评论(0编辑  收藏  举报