Linux/fmt

From Omnia
Revision as of 21:46, 18 August 2015 by Kenneth (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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