in reply to Re: thumbnails generator
in thread thumbnails generator

I agree but I don't know much bash/shell scripting so I'm using what I know.
Also shell scripting is not very flexible.In particular,what you wrote there
in brackets "do whatever with $size here" will probably not be accomlished
very easily using shell scripting.

Replies are listed 'Best First'.
Re^3: thumbnails generator
by oko1 (Deacon) on Apr 20, 2008 at 16:25 UTC

    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
    

      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.