|
This is a multi-part message in MIME format.
--------------657E3D9F5FD4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Don Cram wrote:
>
> Does anyone on SAS-L have a unix utility program to address this problem?
>
> In the following local posting, I stated specifications for a unix
> utility to work like the dvips utility, which prints TeX and LaTeX
> device-independent files to a postscript file or printer. No local
> solution is yet available.
>
> >Don
> >
> >P.S. Based on su.computers.consult discussions a year or two ago, it is NOT
> >feasible to generate a postscript file for the entire SAS output and
> >then use ghostview or any other means to print selected pages. We
> >couldn't get that to work, and it involved creating and saving huge
> >postscript files. The SAS output is best kept in its ASCII form, and
> >converted to postscript only as needed in the printing process.
> >
>
Don:
I think I get your drift, but I didn't actually read your entire post.
Here
is a shell script that does something like what you want.
Rodney
--------------657E3D9F5FD4
Content-Type: text/plain; charset=us-ascii; name="pagesplit"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="pagesplit"
#!/bin/csh
foreach i ($*)
if (! $?PAGESPLIT) then
setenv PAGESPLIT 0
\csplit -s -k -f $i:r $i '/ /' '{98}' >& /dev/null
else
\csplit -s -k -f $i:r $i '% %' '/ /' '{98}' >& /dev/null
endif
@ page = $PAGESPLIT
foreach j ($i:r[0-9][0-9])
@ page++
if ( ($page - $PAGESPLIT) < 100 ) then
\tr -d ' ' < $j >! $i:r.$page
\rm $j
else
@ page--
setenv PAGESPLIT $page
\mv $j $i:r.$page+
pagesplit $i:r.$page+
\rm $i:r.$page+
endif
end
end
--------------657E3D9F5FD4--
|