一般[root@lamp scripts]# wget 192.168.152.5 --spider|grep 200会出现下面情况
Spider mode enabled. Check if remote file exists.
–2018-11-03 09:03:46-- http://192.168.152.5/
Connecting to 192.168.152.5:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 23 [text/html]
Remote file exists and could contain further links,
but recursion is disabled – not retrieving.
如何取到我们要的返回值“200”行呢,须在wget后加上2>&1
[root@lamp scripts]# wget 192.168.152.5 2>&1|grep 200
HTTP request sent, awaiting response… 200 OK
wget url获取200返回值
最新推荐文章于 2021-03-26 05:52:29 发布