FOLD (1)

NAME

fold - fold long lines

CONTENTS

Synopsis
Description
Environment Variables
See Also

SYNOPSIS

fold [-b] [-s] [-w width | -width] [file ...]

DESCRIPTION

Fold reads its input files, or of standard input if no file argument is present, and folds lines that exceed 80 columns (i.e. it inserts newline characters). It interprets backspace, tabulator, and carriage return characters in input.

The following options are accepted by fold:
-b Use bytes instead of columns. All characters except for the newline character are counted according to the space consumed in bytes. This option has been introduced by POSIX.2.
-s Try to preserve words, if possible. If a blank character appears in an input line before it exceeds the width limit, the line is prematurely folded after this character. This option has been introduced by POSIX.2.
-w width Set the maximum output line length (in columns or bytes) to width instead of the default 80.

ENVIRONMENT VARIABLES

LANG, LC_ALL
  See locale(7).
LC_CTYPE
  Determines the mapping of bytes to characters and the set of blank characters. Multibyte characters are not split by fold; the line is folded before the character that would cause it to exceed the maximum width.

SEE ALSO

fmt(1), pr(1)


Heirloom Toolchest FOLD (1) 12/6/04
Generated by a modified version of manServer 1.07 from fold.1 using man macros.