wcurl: A Simple Wrapper for curl to download files
Do you find it challenging to remember curl
's parameters for downloading files?
wcurl
can simplify this process. It's a simple wrapper around curl
designed to make file downloads easier.
π οΈ Setting Up wcurl
Follow these steps to set up wcurl
on your system.
Step 1: Copy the wcurl
Shell Script
First, you need to get the wcurl
script. You can find it on GitHub. Download and move it to your /usr/bin
directory:
wget https://raw.githubusercontent.com/Debian/wcurl/main/wcurl
sudo mv wcurl /usr/bin/
Step 2: Make the Script Executable
Next, you need to change the script to executable mode:
sudo chmod +x /usr/bin/wcurl
π» using wcurl
Now that you have wcurl
set up, you can start using it to download files.
Example: Downloading a File
To download a file using wcurl
, simply run:
wcurl https://k8s.io/examples/application/deployment.yaml
Display Help Information
If you need to understand the supported options, you can use the --help
flag:
wcurl --help
This will display:
/usr/bin/wcurl -- a simple wrapper around curl to easily download files.
Usage: /usr/bin/wcurl [-o <CURL_OPTIONS>|--opts=<CURL_OPTIONS>] <URL>...
Options:
-o,--opts <CURL_OPTIONS>: Specify extra options to be
passed when invoking curl.
<URL>: The URL to be downloaded. May be specified more than once.
using curl options with wcurl
You can use curl
options with wcurl.
Here is an example.
wcurl -o "-o deployment.yaml" https://k8s.io/examples/applicatio
n/deployment.yaml