$ wget --output-document=/dev/null http://website.com/file.jpg
Resolving speedtest.sea01.softlayer.com... 67.228.112.250
Connecting to speedtest.sea01.softlayer.com|67.228.112.250|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1986284 (1.9M) [image/jpeg]
Saving to: `/dev/null'
2011-10-02 22:38:04 (337 KB/s) - `/dev/null' saved [1986284/1986284]
以上所有内容都是有效的,但我想知道如何将最后一行存储在变量中或通过GREP传递 -> /((.+))/
(我正在尝试解析平均 KB/s)
wget
? - Borealidtail -1
,您会得到什么? - Gabeab
工具可以使用。如果你正在进行端到端测试,我通常使用iperf
,它非常棒。 - Borealid