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

Why doesn't this work?:
wget -q -U Mozilla "" -O - | tr '\n' ' '

p.s.: and under openwrt 10.03:
# wget "" -O -
Connecting to (
wget: bad header line: slash_LOG_DATA: shtml

share|improve this question
The tr '\n' ' ' has nothing to do with it. wget is getting an error when trying to download the file. – Wuffers Jan 22 '11 at 16:54
wget -q -U Mozilla "" -O - | tr '\n' ' ' works perfectly for me – Nifle Jan 23 '11 at 10:44
What error does wget -q -U Mozilla "" -O - give? What is your expected result of doing that whole command with tr and what do you get instead? – Tom Wijsman Jan 24 '11 at 22:06
wget "" -O -


HTTP/1.1 200 OK  
Server: Apache/1.3.42 (Unix) mod_perl/1.31  

wget performs bad on the third line of the header, seems like a bug to me. I would suggest reporting it.

Furthermore, I would suspect that site to act weird as they are using old standards...

share|improve this answer

This still happens and isn't a fault or bug. The wget command will create a file - whether you download something or not. So the second time you issue the same command the file is already there.

This happens for instance when you use wget in a BeagleBone to pass weather info to your website for logging purposes:


wget ""

*NOTE: (Filename starts with first letter after the last "/" and ends with last letter or first blank)

This will run OK the first time but the second time it will produce named error because wget tries again to create a file with the name "tempinfo.php?temp=15".

What you could do is (re)direct the dummy file to dummy output ;-)

So the proper command in this case would be:

wget "" -O /dev/null
share|improve this answer

You must log in to answer this question.

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