#!/bin/csh -f

set list = ( *.pgm )

foreach file ( $list )
  set newFile = $file:r
  convert $file ${newFile}.jpg
end

