#! /bin/csh -f
#
#	getpages:
#
#	Takes a .ps file and creates a new .ps file for each page
#	in the original.
#
#	N.Batchelder, 3/8/86.
#

set File=$1
set Pages=`grep -c '^%%Page[: ]' $File`
set Page=1
while ($Page <= $Pages)
	echo $File.$Page
	psrev -s$Page -R <$File >$File.$Page
	@ Page++
end
