Formatting Text Files for Viewing and Printing

The commands illustrated in this section offer ways to take plain text files and tidy them up or present them differently for display or printing.

The pr command takes a text file and splits it into pages of text separated by a number of newlines with a header on each page. Optionally, it can add a form feed character between the pages for sending the output directly to a printer. For example, using the command with no options:

[email protected]:~ > pr README.txt will output pages with a header on each looking like this:

2004-08-10 12:26 INDEX Page 1

Was this article helpful?

0 0

Post a comment