|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to print a specific page
Hi there,
Does anyone know how to print a specified page using command like lpr? Thanks, |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
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 |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
What if there is a page feed embeded?
|
|
#4
|
|||
|
|||
|
Code:
sed 's/^L//g bigfile | pr +"$1" | awk 'NR<67' > tmpfile where ^L is ctrl-L. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Print multiple copies page by page using lp command | megha2525 | Shell Programming and Scripting | 7 | 04-20-2012 12:56 PM |
| Printer won't print but 1 page | slak0 | Slackware | 2 | 04-09-2012 03:26 PM |
| Print Specific lines when found specific character | attila | Shell Programming and Scripting | 4 | 01-26-2012 04:33 AM |
| print first few lines, then apply regex on a specific column to print results. | kchinnam | Shell Programming and Scripting | 4 | 08-24-2010 03:24 PM |
| lpr- how to print from page to page | naamas03 | Shell Programming and Scripting | 4 | 12-26-2007 05:30 AM |
|
|