Page 1 of 1

wget

Posted: Mon Jan 02, 2006 2:15 pm
by jameswilson
can anyone get wget to work with zms, i want to use zms to grab me an image and save locally but whenever i try i getno data recieved and eventually it gives up. It looks like its breaking up the url

James

Posted: Mon Jan 02, 2006 3:38 pm
by jameswilson
ok then i can get wget to download the jpeg from zms if i encapsulate the path with quotes. Problem is i want to call a shell command

eg shell "wget http://jpg1.jpg"
and as i need the quoptes around the path statemant this is causing me grief. As i know little about wget can i tell it its a pth without the " or can i ue it in my scripte without the double "

Im using gambas. In vb.net i can just use """ but this wont work in linux so im hoping i can do the " thing without the " in wget

Many Thanks

James

Posted: Mon Jan 02, 2006 7:35 pm
by zoneminder
I'm a bit confused about which quotes are which but you should be able to do

Code: Select all

"wget 'http://<...>'"
shouldn't you? Unless you want to expand shell variables then single and double quotes are pretty much the same in shells.

Phil

Posted: Mon Jan 02, 2006 7:44 pm
by jameswilson
you would have thought so but if i do that i get
http://192.167.0.3/cgi-Bin/nph-zms?mode ... ass=xxxxxx
=> `nph-zms?mode=single&monitor=2&scale=100&user=admin&pass=xxxxxx'
Connecting to 192.167.0.3:80... connected.
HTTP request sent, awaiting response... 404 Not Found
19:41:54 ERROR 404: Not Found.
wgt seems to break apart the url unless tyhe quotes are in place. If i run from shell without quotes around the url i get an error. I need to get wget to download the still without the quotes, ny ideas
?

James

Posted: Mon Jan 02, 2006 7:46 pm
by zoneminder
You have typed cgi-Bin rather than cgi-bin. That may be significant.

Phil

Posted: Mon Jan 02, 2006 7:49 pm
by jameswilson
[root@localhost ~]# wget http://192.167.0.3/cgi-bin/nph-zms?mode ... ss=xxxxxxx



[1] 4721
[2] 4722
[3] 4723
[4] 4724
--19:48:06-- http://192.167.0.3/cgi-bin/nph-zms?mode=single
=> `nph-zms?mode=single'
Connecting to 192.167.0.3:80... [root@localhost ~]# connected.
HTTP request sent, awaiting response... No data received.
Retrying.

--19:48:08-- http://192.167.0.3/cgi-bin/nph-zms?mode=single
(try: 2) => `nph-zms?mode=single'
Connecting to 192.167.0.3:80... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

Posted: Mon Jan 02, 2006 8:31 pm
by jameswilson
sorted needed an extra space after the last ' before the last "

Thanks Phil