I'm interested in creating a script that makes no use of wget
which downloads a file from a specified link . The download should be saved as world.o
in the folder /tmp
.
Can anybody walk me through this ? I'm really new with scripting.
-
I am confused. Are you asking for a solution that does not use wget?– TobiasDec 12, 2014 at 18:46
-
That's exactly right :)– user43389Dec 12, 2014 at 18:47
Add a comment
|
1 Answer
You can use curl. Make a file that contains the following:
#!/bin/bash
curl -o target/path/filename URL
Where target/path/filename is the folder you want to save it to /tmp
and URL is your specified link.
So
#!/bin/bash
curl -o /tmp/world.o http://example.com/your.file
If curl is not installed, you can install it with sudo apt-get install curl
.