fmt—Adjust line-length for paragraphs of text

fmt [–width][files]…

fmt is a simple text formatter. It inserts or deletes newlines, as necessary, to make all lines in a paragraph be approximately the same width. It preserves indentation and word spacing.

The default line width is 72 characters. You can override this with the –width flag. If you don’t name any files on the command line, then fmt will read from stdin.

It is typically used from within vi to adjust the line breaks in a single paragraph. To do this, move the cursor to the top of the paragraph, type !gfmt, and press Return.

If You Like What We Do Here On LinuxConcept, You Should Consider:

Stay Connected to: Twitter | Facebook

Subscribe to our email updates: Sign Up Now


We are thankful for your support.

Follow me