-P PageList Prints the pages specified in PageList. This flag can be used only if there is a filter available to handle it; otherwise, the print request is rejected. The PageList may consist of ranges of numbers, single page numbers, or a combination of both. The pages are printed in ascending order.
With AIX printing you can use the qprt -g 30 flag to start printing at page 30, but not to stop at that point. This only works for ASCII text files where the _d attribute = a for the virtual printer (not formatted PS or PCL)
The head command will only work if you have the same number of lines on each page. Then say your pages are all 60 characters long 30*60=1800 so you use head
qprt -1800 filename | qprt -Pqueue
If you want to use the lp command as described earlier with a shell script interface script, then you would have to use the System V printing mode available in AIX 5.1 and later.
Another option with qdaemon based printing is to write a custom backend. It's not really too hard, or to try to use another filter. You can also do some nice formatting with the pr filter, but it won't meet the needs here.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.