in reply to Re^2: thumbnails generator
in thread thumbnails generator

Actually, it is indeed accomplished very easily. The fact that it's so complicated in your script is a demonstration that you're coercing a square peg into a round hole.

size=`/usr/bin/identify "$image"|/usr/bin/cut -d' ' -f 3` /usr/bin/convert -geometry "$size" "$old_name" "$new_name"

-- 
Human history becomes more and more a race between education and catastrophe. -- HG Wells

Replies are listed 'Best First'.
Re^4: thumbnails generator
by Fletch (Bishop) on Apr 21, 2008 at 12:31 UTC

    Of course given a better shell you can do even more inline:

    size=${=${$(identify "$image")}[3]}

    (And people say Perl is executable line noise . . . :)

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.