#!/bin/bashseq 0 9 | awk "{ print \"convert cake_layers.png -crop 300x154+0+\" \$0*154 \" cl_\" \$0 \".png\" }" | bash
You can do this a bit cleaner (eg. not generating code) in POSIX-compatible shell: for X in $(seq 0 9); do convert cake_layers.png -crop 300x154+0+$(($X * 154)) cl_${X}.png; don
You can do this a bit cleaner (eg. not generating code) in POSIX-compatible shell:
ReplyDeletefor X in $(seq 0 9); do convert cake_layers.png -crop 300x154+0+$(($X * 154)) cl_${X}.png; don