#!/bin/sh -f texfile=' doser zhaozg bugg seth bressani singovski narison amsler agnello glazov ehrlich eugenio-plen zaitsev metsch zoubs mabq ryabchikov eichler whitmore-plen miscetti chenjp achasov nakada aleppo liuth kloet burdin1 thiergen thompson winston zhaoq druzhinin miaot guyf liuf korotkikh wicke fedotovitch lemoigne_tk5 parallel thoma shaw1 shaw2 jins pelaez1 pelaez2 suh1 suh2 chengp badaud lotto tonazzo tilquin lihb sarantsev anisovich sarycheva maltman mishida hill buescher shenpn nakamura omegaeta eta4pi louxc peaslee giovannella takamatsu nozdrachev burdin2 noya pick xugf root doyle zhangzq whitmore-para rongg chanct sishida sawada yangs summary chung lipkin' echo $texfile # #first page is plenary's article latex plenary;latex plenary;dvips -o plenary.ps plenary # #get the last page No. of doser's article page=`grep Page: plenary.ps | tail -1 |awk '{print $2}' ` echo $page # for f in $texfile; do page=`expr $page + 1` echo $page junk=`expr '/setcounter/s/{[1-9].*}/{'$page'}/' ` echo $junk sed ''`echo $junk`'' $f.tex > a mv a $f.tex latex $f;latex $f;dvips -o $f.ps $f page=`grep Page: $f.ps | tail -1 |awk '{print $2}' ` echo $page done