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
Answer
Use tee
:
wget -o /dev/stdout -r -np -nH -R index.html http://dumps.wikimedia.org/viwikibooks/latest/ | tee -a ./$logn-viwikibooks.txt
No comments:
Post a Comment