Skip to content

Instantly share code, notes, and snippets.

@samuelwilliams
Created October 18, 2015 09:35
Show Gist options
  • Save samuelwilliams/8482a0f9c3b1ce257956 to your computer and use it in GitHub Desktop.
Save samuelwilliams/8482a0f9c3b1ce257956 to your computer and use it in GitHub Desktop.
Simple script to batch download sequential files.
#!/usr/bin/env bash
PREFIX='http://example.com/gallery/pic_'
SUFFIX='.jpg'
START=1
END=25
FORMAT="%02d"
for i in `seq $START $END`;
do
wget $PREFIX$(printf $FORMAT $i)$SUFFIX
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment