LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   pr command, how to remove page numbering? (https://www.linuxquestions.org/questions/linux-newbie-8/pr-command-how-to-remove-page-numbering-798081/)

carlc1 03-26-2010 11:49 AM

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.

David the H. 03-26-2010 12:25 PM

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]\+$//'


All times are GMT -5. The time now is 07:04 PM.