#! /bin/csh -f
# Imprime DVI (com postscrip images) na Epson do Tomasz
if ($#argv == 0) then
echo 'Usage: dvipsep  file [pi[ pf]]'
else if ($#argv == 1) then
  dvips  -f -o`pwd`/$1.ps `pwd`/$1.dvi
else if ($#argv == 2) then
  dvips  -f -p $2  -o `pwd`/$1.ps `pwd`/$1.dvi
else if ($#argv == 3) then
  dvips  -f -p $2 -l $3 `pwd`/$1.dvi >`pwd`/$1.ps
else
echo 'Usage: $0 file [ firstpage [ lastpage ] ]'
exit
endif
gs -q -sDEVICE=laserjet -dNOPAUSE -sOutputFile=$1.hp -- $1.ps
lpr -h -r -Pepson $1.hp
/usr/bin/rm -f $1.ps
