A few lines of shell code and the Gawk scripting language make downloading files off the web a breeze.
Almost everyone downloads data from the Internet. In most cases, you use the the web browser as the interface. Usually, websites offer files for download that you can click on individually in the browser. By default, the files usually end up in your
Downloads/ folder. If you need to download a large number of files, manually selecting the storage location can quickly test your patience. Wouldn’t it be easier if you had a tool to handle this job?
In this article, I will show you how to program a convenient download manager using Bash and a scripting language like Gawk. As an added benefit, you can add features that aren’t available in similar programs, such as the ability to monitor the disk capacity or download files to the right folders based on their extensions.
Programming a download manager definitely requires good planning and a sensible strategy. Obviously, the download manager should download files, but it should also warn you when the hard disk threatens to overflow due to the download volume. Because most files have an extension (e.g.,
.epub), the download manager also can sort your files into appropriately named folders based on the extensions.
Use Express-Checkout link below to read the full article (PDF).