Created
October 31, 2014 13:35
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#<[email protected]> | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
awesome
👍