Skip to content

Instantly share code, notes, and snippets.

@sofusalbertsen
Last active January 8, 2017 18:57
Show Gist options
  • Save sofusalbertsen/9a3c9325666373b91e438e273c720d94 to your computer and use it in GitHub Desktop.
Save sofusalbertsen/9a3c9325666373b91e438e273c720d94 to your computer and use it in GitHub Desktop.
Bash script to download the main flowers from flora danica.
#! /bin/bash
for b in 0{1..9} {10..51}
do
for i in 000{1..9} 00{10..99} 0{100..999} {1000..3099}
do
(wget "http://kb-images.kb.dk/online_master_arkiv/non-archival/DUP/floradanica/h$b/floradanica_$i/0,0,5000,5000/,2000/0/default.jpg" -O "$b$i.jpg";
)&
done
find . -name '*.jpg' -size 0 -print0 | xargs -0 rm
done
echo "done"
@sofusalbertsen
Copy link
Author

If you run on MacOS, then replace wget with curl and -O with -o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment