#!/bin/bash for i in $(seq 0 $1) do wget http://cdn.photosynth.net/ps2/$2/packet/l1/img`printf %04d ${i%.*}`.jpg done