Last active
March 2, 2016 11:32
-
-
Save tungd/3a55a02e3686b5b2e11a to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
BATCH_SIZE=250 | |
mkdir output | |
count=0 | |
for file in *.jpg; do | |
convert -resize 256x256\! "$file" "output/$file" & | |
let count+=1 | |
[[ $((count % BATCH_SIZE)) -eq 0 ]] && sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment