Using Script to Download a File

Using Script to Download a File

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.

2

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 

If curl is not installed, you can install it with sudo apt-get install curl.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.