Small Script to Download Multiple Files in a Sequence

Here’s a small script I wrote to download all fifteen issues of INSECURE magazine. You can easily adapt this to download anything you like, magazines, podcasts, etc., as long as they are in a known sequence.

#!/bin/sh
for i in $(seq 1 15)
do
`wget http://www.net-security.org/dl/insecure/INSECURE-Mag-$i.pdf &`;
done;

To download all episodes of Security Now, just change the end of the sequence to be 131 instead of 15, and change the URL to:
http://media.grc.com/sn/SN-$i.mp3

To get all episodes of Pauldotcom Security Weekly, use a high value of 97, and a URL of
http://media.libsyn.com/media/pauldotcom/pauldotcom-SW-episode$i.mp3

Leave a Reply