Saturday, October 26, 2013


So a few days ago I was browsing a site

and I wanted to download the images, but there are like 72 of them and I don't want to right click each one and save them. So I was thinking since I could use wget, but I don't want to download the whole site. I just want the pictures of this sweet looking bike! So I took a look at the URL for the images and sure enough they are all using a simple naming scheme (e.g. speed_001.jpg). So what immediately comes to mind is a bash script with a for loop calling wget to download all the images for me (because you know as programmers we are lazy).

for ((i=1; i<=NUM; i++)) {

    if [ $i -lt 10 ]
        wget ${ADD}
        wget ${ADD}

I'm not saying that this is the only way to do this, it's just what came to mind when faced with the problem.