Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am writing a script that will download Wikipedia dumps. I want wget to write all message to a log file but I also want it to write all message to the screen. Any answer? I use this script and it only write infomation to the log file.

wget -r -np -nH -R index.html -a ./$logn-viwikibooks.txt http://dumps.wikimedia.org/viwikibooks/latest/

Which

logn=`date +%d-%m-%Y'

Even if I add '-v' option, there is nothing on the screen

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Use tee:

wget -o /dev/stdout -r -np -nH -R index.html http://dumps.wikimedia.org/viwikibooks/latest/ | tee -a ./$logn-viwikibooks.txt
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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