LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2010, 12:49 PM   #1
carlc1
LQ Newbie
 
Registered: Feb 2010
Posts: 12

Rep: Reputation: 0
Question pr command, how to remove page numbering?


When using the pr command for formatting simple text files for printing, page numbers are included in the header by default. I figured out how to remove the date from the header (pr -D ""), and how to remove the title (pr -h ""), but for the life of me I can't figure out how to remove page numbering from the header.

Anybody know how/if this can be accomplished?

As always, any help is greatly appreciated.
 
Old 03-26-2010, 01:25 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,834

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Hmm. There is the "-t" option which removes all headers. But you're right that there doesn't seem to be any option to remove only the page numbering.

You could always go with a brute-force approach though.
Code:
pr file.txt |sed 's/Page [0-9]\+$//'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Writer Page Numbering Issue swamprat Linux - Software 2 09-12-2009 12:07 AM
Configuring support for PAGE MIGRATION and MEMORY HOT REMOVE sbc Linux - Newbie 1 12-27-2008 04:46 PM
Remove page advance when printing to a Oki ML 390 dot matrix OOsorio Linux - Newbie 0 05-19-2008 05:02 PM
OpenOffice page numbering, yet again steve s. Linux - Software 1 09-11-2006 09:56 PM
Open Office Page Numbering little_penguin Linux - Software 2 01-07-2006 08:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration