#!/bin/csh # # transformation des dessins postscript du fichier: nom_du_fichier # (par defaut ftn24) de CASTEM 2000 # dans plusieurs fichiers EPSF: nom_racine.numero.epsf # # utilisation: # castem2epsf nom_du_fichier nom_racine # # fichiers auxilliares necessaires: # cut.awk rech_maxi.awk # # Auteurs : M.Bulik et A.Constantinecscu, LMS-X, Avril 1993 # setenv CAS2PS_HOME /u2/chloe/bin if( $#argv != 2 ) then echo 'Usage : cast2epsf filename.ps rootname' exit endif echo ' Cutting ' $1 ' into pieces ' sed s/name_root/$2/g $CAS2PS_HOME/cut.awk > cut.tmp awk -f cut.tmp $1 # /bin/rm -f cut.tmp set counter = 0 echo ' Creating the EPSF files ' foreach i ($2.[1-9]*) echo $i.epsf sed -e '$ d' $i > $i.cat cat prolog $i.cat > $i.ps awk -f $CAS2PS_HOME/rech_maxi.awk $i.ps > bb.tmp sed -f bb.tmp $i.ps > $i.epsf # /bin/rm -f $i $i.cat $i.ps # /bin/rm -f bb.tmp # /bin/rm -f les_lineto @ counter = $counter + 1 end echo ' Removing the last file (no plot) ' $2.$counter.epsf # /bin/rm -f $2.$counter.epsf # /bin/rm -f prolog