Scripting: How to put wget in foreground?
Hi there.
I am using wget in a script for downloading stuff from sourceforge (http). It seems to start in background, so that the script continues. This makes the script fail. How do I get wget in the forground? Or is there another solution to it. Somehow downloads from ftp server do work. THX |
nothing will fork unless you tell it to... maybe if you actually showed us your script you'd be able to get more help... with urls from sf.net and such, are there maybe some &'s in the url that you're not handling properly?
|
Hi,
Try using the command wait. It should do the job. I found the following link for an example on how to use it: link |
Hi.
This is the function I use in the script. Code:
download () { I'll checkout the "wait" hint. Even though I don't understand, why it is not working. THX so far. Cheers |
"wait" did the trick.
THX a lot. :D |
well wait isn't the right way to solve this at all... As i guessed, the & in the url is causing a fork, so everything after that is being treated as a new command, which will fail and give an error before moving on. if the url works with the & and everything past it removed, then remove it.
|
... or put a single quote on either side of the URL.
|
THX a lot folks. A real beginner problem.
When I look at it now - it seems to be more than obvious. ;) Cheers |
All times are GMT -5. The time now is 01:13 AM. |