Name

fold

Synopsis

fold [option] [files]

Breaks the lines of the named files so they are no wider than the specified width (default is 80). fold breaks lines exactly at the specified width, even in the middle of a word. Reads from standard input when given - as a file.

Options

-b

Count bytes, not columns (i.e., consider tabs, backspaces, and carriage returns to be one column).

-s

Break at spaces only, if possible.

-w width

Set the maximum line width to width. Default is 80.

Get Mac OS X Tiger in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.