Is it possible to make a script download a file off the internet http://something.... and bring it into the local directory?
Printable View
Is it possible to make a script download a file off the internet http://something.... and bring it into the local directory?
You don't need to, there already is wget, which takes a URL and download the file it points to to the cwd.
Is that what you were looking for, or do you really, really want to do the script?
For some reason wget (BTW it's linux-gnu) isn't working for me on the account I'm trying to use it on (sourceforge.net if it helps). Basically I want to grab a tarball from sourceforge (using wget to grab files on other addresses works though) and put it into my directory...
sourceforge is weird, make sure you have the correct url (the one that ends in .tar.gz, not the "?save=1" or whatever that url is) This got me for a while, to get around it you would have to parse html I think.
you can also use
lwp-request http://www.