Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .