APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

fold, fmt

© November 2003 Tony Lawrence

Similar in intent, but fmt is the more powerful of the two.

The purpose is to reformat lines to fit a fixed width output device, and to do it intelligently so that lines are broken at appropriate places rather than mid wo
rd (like that).

Within vi, you can simply do ":.!fmt" to fix an unruly paragraph, or ":1,$!fmt" to do the entire document. That's simple usage, "fmt" has many useful options.

Of course, "fmt file | lpr" can also be useful.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> fold, fmt

1 comment

Inexpensive and informative Apple related e-books:

Take Control of Automating Your Mac

Take Control of Numbers

El Capitan: A Take Control Crash Course

Take Control of Upgrading to El Capitan

Photos for Mac: A Take Control Crash Course

More Articles by © Tony Lawrence

Thanks for the tip! No more 'fold' for me - 'fmt' works much better when printing README files to the printer!

- Bruce Garlock


Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

Don't blame me for the fact that competent programming, as I view it as an intellectual possibility, will be too difficult for "the average programmer" — you must not fall into the trap of rejecting a surgical technique because it is beyond the capabilities of the barber in his shop around the corner. (Edsger W. Dijkstra)

Linux posts

Troubleshooting posts

This post tagged:



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode