#! /bin/csh -f setenv PATH ~keung/ps/ezp:"$PATH" set fn=$1:t set fn=$fn:r set wfn=$1 if (-e $1.ezp) set wfn=$1.ezp (cat ~keung/ps/ezp/ezp.pz ; gawk '{if (substr($0,1,3)=="%< ") \\ system(substr($0,4,length($0)-3)) ; else print $0}' $wfn ) >! ps/$fn.ps chmod o+r ps/$fn.ps if ($2 == "") exit if ($2 == "jpg") then gs -dNOPAUSE -sDEVICE=jpeg -sOutputFile=$HOME/hut/$fn.jpg -- ps/$fn.ps chmod o+r ps/$fn.jpg exit endif $2 ps/$fn.ps exit