Created
December 8, 2013 10:45
-
-
Save yuitest/7855785 to your computer and use it in GitHub Desktop.
シェルスクリプトって、複雑な分岐を書くよりも「答えを作るシェルスクリプトを作るシェルスクリプトを書く」
方が美しいよね。 xargs との相性も良いし。
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
#!/bin/sh | |
NAME='siranaiwa.png' | |
DIR='images' | |
PREFIX='t' | |
for i in 40 70 90 100 | |
do | |
for j in 40 70 90 100 | |
do | |
for k in 40 70 90 100 | |
do | |
echo "convert $NAME -fuzz 0% -fill 'rgb($i,$j,$k)' -opaque 'rgb(255,255,255)' $DIR/$PREFIX-$i-$j-$k.png" | |
done | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment