Sponsored Content
Full Discussion: How to print a specific page
Top Forums UNIX for Dummies Questions & Answers How to print a specific page Post 302105232 by jim mcnamara on Wednesday 31st of January 2007 12:53:43 PM
Old 01-31-2007
You're better of just creating a tmpfile with the one page and printing that
Assuming 66 lines per page with no page feed (ASCII 12) embedded:
Code:
# $1 = page number
pr +"$1" bigfile | awk 'NR<67' > tmpfile

tmpfile now is a 66 line file to send to lpr
See man pr to change page length
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to print multi page to one for pdf in unix??

I need help on printing PS and PDF file. I find it will waste a lot of paper if I print every pages. So I want to print multipage into one. But I forgot how to do it in unix. Anyone help me!!! :D ;) :p (2 Replies)
Discussion started by: sunartio
2 Replies

2. Shell Programming and Scripting

lpr- how to print from page to page

hi all i have file_1 which contains 66 pages and i want to print only page 1 to 3 i try to write like this lp -d name_of_printer file_1 -P 1-7 this command does not work any ideas ? (4 Replies)
Discussion started by: naamas03
4 Replies

3. UNIX for Dummies Questions & Answers

print job seperator page

How do I get my linux login ID to print on seperator page on print jobs. Right now it prints " Remote User" thanks Jim (0 Replies)
Discussion started by: jdmowrer
0 Replies

4. Shell Programming and Scripting

print first few lines, then apply regex on a specific column to print results.

abc.dat tty cpu tin tout us sy wt id 0 0 7 3 19 71 extended device statistics r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device 0.0 133.2 0.0 682.9 0.0 1.0 0.0 7.2 0 79 c1t0d0 0.2 180.4 0.1 5471.2 3.0 2.8 16.4 15.6 15 52 aaaaaa1-xx I want to skip first 5 line... (4 Replies)
Discussion started by: kchinnam
4 Replies

5. Shell Programming and Scripting

Print Specific lines when found specific character

Hello all, I have thousand file input like this: file1: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$ | | | |$$ $$ UERT | TTYH | TAFE | FRFG |$$ $$______|______|________|______|$$ $$ | | | |$$ $$ 1 | DISK | TR1311 | 1 |$$ $$ 1 |... (4 Replies)
Discussion started by: attila
4 Replies

6. Slackware

Printer won't print but 1 page

OS: Slackwar 13.37 Printer: hpDeskjet 1000 j110 Printer Drivers/Software: HPLIP 3.11.3a (min was 3.10.9) and Cups The printer will print the first of n-pages but from page 2 on it prints the page (or part of it) backs up and starts again down about 0.8 lines and does this repeatedly till the... (2 Replies)
Discussion started by: slak0
2 Replies

7. Shell Programming and Scripting

Print multiple copies page by page using lp command

Hi I have a pdf file that is being generated using the rwrun command in the shell script. I then have the lp command in the shell script to print the same pdf file. Suppose there are 4 pages in the pdf file , I need to print 2 copies of the first page, 2 copies of the second page , then 2... (7 Replies)
Discussion started by: megha2525
7 Replies

8. UNIX for Dummies Questions & Answers

How to Detect Specific Pattern and Print the Specific String after It?

I'm still beginner and maybe someone can help me. I have this input: the great warrior a, b, c and what i want to know is, with awk, how can i detect the string with 'warrior' string on it and print the a, b, and c seperately, become like this : Warrior Type a b c Im still very... (3 Replies)
Discussion started by: radynaraya
3 Replies

9. Shell Programming and Scripting

How to print with awk specific field different from specific character?

Hello, i need help with awk. I have this file: cat number DirB port 67 er_enc_out 0 er_bad_os 0 DirB port 71 er_enc_out 56 er_bad_os 0 DirB port 74 er_enc_out 0 er_bad_os 0 DirB port 75 ... (4 Replies)
Discussion started by: elilmal
4 Replies

10. Shell Programming and Scripting

How to print multiple specific column after a specific word?

Hello.... Pls help me (and sorry my english) :) So I have a file (test.txt) with 1 long line.... for example: isgc jsfh udgf osff 8462 error iwzr 653 idchisfb isfbisfb sihfjfeb isfhsi gcz eifh How to print after the "error" word the 2nd 4th 5th and 7th word?? output well be: 653 isfbisfb... (2 Replies)
Discussion started by: marvinandco
2 Replies
postprint(1)							   User Commands						      postprint(1)

NAME
postprint - PostScript translator for text files SYNOPSIS
postprint [-c num] [-f name] [-l num] [-m num] [-n num] [-o list] [-p mode] [-r num] [-s num] [-t num] [-x num] [-y num] [file...] /usr/lib/lp/postscript/postprint DESCRIPTION
The postprint filter translates text files into PostScript and writes the results on the standard output. If no files are specified, or if - is one of the input files, the standard input is read. OPTIONS
-c num Print num copies of each page. By default, only one copy is printed. -f name Print files using font name. Any PostScript font can be used, although the best results will be obtained only with constant width fonts. The default font is Courier. -l num Set the length of a page to num lines. By default, num is 66. Setting num to 0 is allowed, and will cause postprint to guess a value, based on the point size that's being used. -m num Magnify each logical page by the factor num. Pages are scaled uniformly about the origin, which is located near the upper left corner of each page. The default magnification is 1.0. -n num Print num logical pages on each piece of paper, where num can be any positive integer. By default, num is set to 1. -o list Print pages whose numbers are given in the comma-separated list. The list contains single numbers N and ranges N1 - N2. A missing N1 means the lowest numbered page, a missing N2 means the highest. The page range is an expression of logical pages rather than physical sheets of paper. For example, if you are printing two logical pages to a sheet, and you specified a range of 4, then two sheets of paper would print, containing four page layouts. If you specified a page range of 3-4, when requesting two logical pages to a sheet; then only page 3 and page 4 layouts would print, and they would appear on one physical sheet of paper. -p mode Print files in either portrait or landscape mode. Only the first character of mode is significant. The default mode is portrait. -r num Selects carriage return behavior. Carriage returns are ignored if num is 0, cause a return to column 1 if num is 1, and generate a newline if num is 2. The default num is 0. -s num Print files using point size num. When printing in landscape mode num is scaled by a factor that depends on the imaging area of the device. The default size for portrait mode is 10. Note that increasing point size increases virtual image size, so you either need to load larger paper, or use the -l0 option to scale the number of lines per page. -t num Assume tabs are set every num columns, starting with the first column. By default, tabs are set every 8 columns. -x num Translate the origin num inches along the positive x axis. The default coordinate system has the origin fixed near the upper left corner of the page, with positive x to the right and positive y down the page. Positive num moves everything to the right. The default offset is 0.25 inches. -y num Translate the origin num inches along the positive y axis. Positive num moves text up the page. The default offset is -0.25 inches. A new logical page is started after 66 lines have been printed on the current page, or whenever an ASCII form feed character is read. The number of lines per page can be changed using the -l option. Unprintable ASCII characters are ignored, and lines that are too long are silently truncated by the printer. EXAMPLES
Example 1: Examples of postprint. To print file1 and file2 in landscape mode, issue the following command: example% postprint -pland file1 file2 To print three logical pages on each physical page in portrait mode: example% postprint -n3 file EXIT STATUS
The following exit values are returned: 0 Successful completion. non-zero An error occurred. FILES
/usr/lib/lp/postscript/forms.ps /usr/lib/lp/postscript/ps.requests ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWpsf | +-----------------------------+-----------------------------+ SEE ALSO
download(1), dpost(1), postdaisy(1), postdmd(1), postio(1), postmd(1), postreverse(1), posttek(1), attributes(5) SunOS 5.10 9 Sep 1996 postprint(1)
All times are GMT -4. The time now is 07:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy