From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Maglinger, Paul" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY:Addendum: Printing only selected pages Date: Fri, 20 Sep 2002 14:46:55 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <64E3EF472A96B048B9147D40BB0031A80347BECF@indyexchange.scvl.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: main.gmane.org 1032551273 27208 127.0.0.1 (20 Sep 2002 19:47:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 20 Sep 2002 19:47:53 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 17sTkl-00074g-00 for ; Fri, 20 Sep 2002 21:47:52 +0200 Original-Received: (qmail 27319 invoked by uid 5); 20 Sep 2002 19:48:08 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 27310 invoked by uid 49493); 20 Sep 2002 19:48:07 -0000 Original-Received: from PMAGLINGER@scvl.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.24. spamassassin: 2.50-cvs. Clear:SA:0(-1.7/5.0):. Processed in 0.456915 secs); 20 Sep 2002 19:48:07 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 20 Sep 2002 19:48:07 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H2R00JUR5O50L@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 20 Sep 2002 15:48:07 -0400 (EDT) Original-Received: from indyexchange.scvl.com (scvl.com [12.28.0.30]) by emroute1.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H2R00B5C5O0LO@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 20 Sep 2002 15:48:00 -0400 (EDT) Original-Received: by indyexchange.scvl.com with Internet Mail Service (5.5.2653.19) id ; Fri, 20 Sep 2002 14:47:01 -0500 Content-return: allowed Original-To: 'Tru64 Unix Managers list' X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:1803 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:1803 Is there a command string or script that will allow you to print select pages or a string of pages from a text document through Tru64Unix 5.1a? The following suggestions were submitted... >From Ernie: You need to be using either the pcfof or ppdof print filters. The lpr option is -Opages=start:end. From the man page: pages=start:end Print the pages of a file within the start and end parameters. When start is not specified, printing starts at page 0. When end is not specified, printing continues to the end of the file. >From Simon: This is pretty tricky to do. The lp command won't do this, you will need to pipe the file through some pre-processing scripts first. This is straight forward enough if you want to print A4 size with 66 lines per page. You read in the file line by line and break it into 66 line segments then print the segments you want. >From Lucio: Possibly you should paginate it before into another file. Perhaps man pr gives some advice on a standard unix command to do it. That, accompanied by some playing with awk or grep, and piped into whatever print command you use, could do the trick. Otherwise just edit the file and save the part you are interested in (manually) or, if you need to automatize, do something like awk 'NR>xx && NRFrom Alan: For simple text files you can use head(1) and tail(1) to extract a range of lines and pass those onto a printer: head -100 file | tail -50 | lpr Assuming I got the options right, the head(1) will get the first 100 lines and the tail(1), the last 50 of that with the result being lines 51-100. Adobe's acrobat reader will let you select page ranges of PDF files. I'd expect word processing software to be able to do the same. I don't know of any options directly in lp or lpr that support this feature, but I've never gone looking for them. If you haven't, check the manual pages for whatever you're using to print the files. Paul Maglinger, A+, CA, CCA, CET, MCSE Systems Administrator Shoe Carnival Inc. (812)867-4674 pmaglinger@scvl.com