I think what you get may depend on what version of BusyBox you are using. I check 3 different versions I happen to have. v1.24.0.git shows only "-s|--spider" and seems to give no output except its return code. v1.27.2 shows "--spider" as well as "-S|--server-response."

Using v1.27.2,
busybox wget -S --spider http://example.com/ 2>&1 | busybox awk '/Content-Length/{print $2}' yields 1256, which is what I think you want. I've never used sed that much but awk is a tool I use a lot; that's why I rewrote the one-liner that way. You may have to get a newer version of BusyBox.

Doug Clapp

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to