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