Linux/fmt: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Created page with "== fmt and pr == Reformat a text file for printing # format file for printing fmt -60 book # reformat with 60 characters per line (wrap at...) pr # format f...")
 
(No difference)

Latest revision as of 21:46, 18 August 2015

fmt and pr

Reformat a text file for printing

# format file for printing
fmt -60 book   # reformat with 60 characters per line  (wrap at...)
pr            # format file for printing (with headers)

Installation:

yum install coreutils

Don't refill and max 120 character width:

fmt file.txt -s -w 120 > output.txt