On 05/06/2012 03:15 PM, Nadav Har'El wrote:
On Sun, May 06, 2012, vordoo wrote about "bash wget script problem":
Please, don't send here HTML mail...
Yep sorry.

     Got a working script, on an ubuntu box, that will not run on arch.
     It stops on:<br>
ip_page=$(wget -q -O - 
http://$router_username:$router_pass@192.168.1.1/Status_Router.asp)
What does "not run" or "stop" actually mean?
Do you get an error? It hangs? Or what?
It's a quick script, <10sec - on Ubuntu. With arch on same pc it will run for 2m25s and finish OK -BUT with wrong output. With bash -x I see the ip_page is empty, ie: wget is not working.

Trying the wget part from bash [version 4.2.24(2)-release (i686-pc-linux-gnu)] prompt with various deferent options, "to protect the password" including your suggestion below will not work:

wget -O - http://admin:1234@192.168.1.1/Status_Router.asp => bash: 1234@192.168.1.1/Status_Router.asp: event not found

wget -O - "http://admin:1234@192.168.1.1/Status_Router.asp"; => bash: 1234@192.168.1.1/Status_Router.asp: event not found

wget -O - http://admin:'1234'@192.168.1.1/Status_Router.asp => --2012-05-06 21:50:50-- http://admin:*password*@192.168.1.1/Status_Router.asp
Connecting to 192.168.1.1:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Failed writing HTTP request: Bad file descriptor.
Retrying.

wget -O - "http://admin:'1234'@192.168.1.1/Status_Router.asp" => bash: 1234: event not found

I can get the page OK, in a browser.

Thanks!


_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to