[lug] Image conversion.

Sean Reifschneider jafo at tummy.com
Sat Dec 23 18:59:49 MST 2000


On Sat, Dec 23, 2000 at 05:36:32PM -0700, Archer Sully wrote:
>"Scott A. Herod" wrote:
>> Looks like ppmtogif wants a file name so try
>> 
>> foreach file ( *.bmp )
>> set outfile=`echo $file | sed 's/bmp/ppm/'`
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>Ghastly.  
>
>set outfile="`basename $file .bmp`".gif

Obtuse.

outfile=${file%.bmp}.ppm

;-)

The ${} stuff like %, #, %%, and ## are pretty handy.

Sean
-- 
 "I was on IRC once and got mistaken for Dan Bernstein. I still have
 nightmares."  -- Donnie Barnes
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python




More information about the LUG mailing list