pr – Paginating files : NIX Classes

the pr commands prepares a file for printing by adding suitable headers, footers and formatted text. A simple invocation of the command is to use it with a filename as argument:
$ pr filename

pr adds 5 line of margin at the top and 5 at the bottom. the header shows the date and time of last modification of the along with the filename and page number.

** pr options
-k               prints in k column
-d              double space input , reduce clutter
-n              numbers lines, helping in debugging code
-o n          offset lines by n spaces, increasing left margin of page
-t               a tab

$ pr -t -n -d -o 10 dept.list

pr often used as a “pre- processor” before printing with the lp command :
$ pr -h "Department list" dept.list | lp

$ pr +10 chap01 lp                                            start printing from page 10
$ pr -l 54 chap01 | lp                                 page length set to 54 lines


njoy the simplicity…….
©Victimizeit

Advertisements

About victimizeit
This is Atul.. working for IBM as a DataStage Developer. I may not be an expert on any particular DataStgae technology, but I'm sure I do know a few things about DB2, AIX, Unix, Windows, and DataBase. In this blog, I'll give out some tips on these subjects. If you find them useful, great, I'll be happy. Thanks for stopping by !!

What is your opinion ?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: