Skip to content

Instantly share code, notes, and snippets.

@nkigen
Created October 31, 2014 13:35
Show Gist options
  • Save nkigen/11b20c975f50c642c1fe to your computer and use it in GitHub Desktop.
Save nkigen/11b20c975f50c642c1fe to your computer and use it in GitHub Desktop.
Shell script to automate the generation of numbered images from dummyimage.com . To use just change the START and END variables and possibly the colors and size. Instead of numbers you can generate text also with a bit of modification
#!/bin/bash
#<nellyk89@gmail.com>
# http://dummyimage.com/600x400/000/fff&text=100000
BASE_URL="http://dummyimage.com/"
DEFAULT_SIZE="600X400"
DEFAULT_BG_COLOR="000"
DEFAULT_COLOR="fff"
START=1001
END=4000
SUFFIX=".png"
for ((i=START; i<=END; i++ ));
do
echo "$BASE_URL$DEFAULT_SIZE/$DEFAULT_BG_COLOR/$DEFAULT_COLOR&text=$i"
wget "$BASE_URL$DEFAULT_SIZE/$DEFAULT_BG_COLOR/$DEFAULT_COLOR&text=$i" -O "$i$SUFFIX"
done
@enricorotundo
Copy link

awesome
👍

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