Linux/fmt

From Omnia
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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