LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 1996, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 8 Oct 1996 09:44:24 -0400
Reply-To:   Rodney Sparapani <spara002@MC.DUKE.DU>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Rodney Sparapani <spara002@MC.DUKE.DU>
Organization:   Duke Clinical Research Institute
Subject:   Re: unix utility to extract pages from SAS output needed

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--


Back to: Top of message | Previous page | Main SAS-L page