Command PR

The command pr is used in UNIX and Linux to represent a page in a better format than it is in the file where it is being printed from. The format that the command pr uses is the keyword “pr” followed by the filename and then as many options as the user wants from a list of options given below:

“-column” could be used to produce multiple columns where the text from the file would be printed in form of columns after columns and arranged in the manner that the original text from the file is received. The default number of columns is one but it can be custom defined as per the flexibility.

“-a” arranges columns in a more unconventional way where text is wrapped around in a round robin manner meaning that the next line of a particular column wouldn’t remain in the same column instead it would go to the next column. This type of column arrangement is seen less often but used in many contexts nonetheless.

The option “-d” produces a double-spaced output on the printed page. This is done by adding an extra newline character whenever the command pr encounters a newline character.

The option “-F” would “fold” the line so that the width of the column could be maintained. If this option isn’t used the width of the line would be 80 characters.

The option “-m” merges files so that multiple files could be printed such that the print seems to be that of a single file. This is useful for long documents in many files. The only limitation of this option is that 9 files could be merged for sure.

Share/Bookmark

0 评论:

Related Posts with Thumbnails