0

Please help me on writing(redirecting) the wget output on a file(i just wanted the status or below lines on /tmp/logfile.log).

Please find my output

$ wget  --no-check-certificate -nv --spider --tries=5 -i url_list.txt >/tmp/logfile.log
2016-08-15 15:23:14 URL: http://25.188.8.5:26005/southamericaend/ 200 OK
2016-08-15 15:23:14 URL: http://25.188.8.5:26005/saendpages/pages/WindowApicross?wsdl 200 OK
Read error (Connection reset by peer) in headers.
Read error (Connection reset by peer) in headers.
Read error (Connection reset by peer) in headers.
Read error (Connection reset by peer) in headers.
Read error (Connection reset by peer) in headers.
1

You need to redirect stderr as well. Change the end of the command to

2>&1 >tmp/logfile.log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.