Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- width=$(identify -format "%w" "$1")
- array=(.jpg .png .gif)
- for ((i=1; i<=$2; i++)) ; do
- ranselect=$(($RANDOM % 3))
- randomres=$(seq 10 99 | sort -R | head -n 1)
- convert "$1" -resize "${width%??}$randomres" $RANDOM${array[$ranselect]}
- done
- #Usage: <name_of_script> <name_of_image> <amount_of_copies>
- #Example: ./randomize.sh example.jpg 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement