Skip to content

Linux fmt command (formats text)

The fmt command in Linux (format) formats text with a specific width. It can remove spaces or add spaces according to the desired width. The default is 75 characters.

The frequently used option is:

-w number: Set the desired width for the text.

Example:

$ fmt —w 50 LEIAME.TXT

Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.

Did you like it?

Share