wrap(1)

wrap1

Filter to word-wrap text

Usage

wrap [-w width] [--version --help]

Overview

This program reads text from standard input, word-wraps it, and writes the result to standard output. The text is formatted to fit a specified number of columns. Extraneous whitespace is removed and lines are only broken on word boundaries.

Options

--help

Display a command synopsis and exit.

--version

Display the program's version information and exit.

-w width

Specify the maximum number of columns width that the text may span. The minimum value of width is 10.

Notes

If wrap encounters a word that is longer than the specified column width, the word is broken across two or more lines to fit within that number of columns.

Author

Mark Lindner

From talkfilters 2.3.8-8 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.