#!ruby # # Cut header of SPL in spool folder to raw EMF # def spl2emf(fnm) File.open(fnm + ".emf", "wb") {|fo| File.open(fnm, "rb") {|fi| str = fi.read pos = str.index(" EMF") if pos == nil print "No EMF marker found; probably wrong file\n" next end fo.write(str[(pos-40)..-1]) } } end if __FILE__ == $0 ARGV.each {|fnm| print fnm, "\n" spl2emf(fnm) } end #### #perl $infile = "08017.SPL"; $outfile = "08017.SPL.emf"; open FH1,"<$infile"; $info = ; close FH1; # # # open FH2,">$outfile"; print FH2 $info close FH2 #end