MPE/iX Shell and Utilities Reference Manual, Vol 1

fold(1) MPE/iX Shell and Utilities fold(1)
NAME
fold — break lines into shorter lines
SYNOPSIS
fold [–bs][–w width][width][file...]
DESCRIPTION
fold reads the standard input, or each file, if you specify any. Each input line is broken into
lines no longer than width characters. If you do not specify width on the command line, the
default line length is 80. The output is sent to the standard output.
Options
fold accepts the following options:
–b specifies the width in bytes rather than in column positions; that is, fold does
not interpret tab, backspace, and carriage return characters.
–s breaks each line at the last blank within width column positions. If there is no
blank that meets the requirement, fold breaks the line normally.
–w width specifies a maximum line length of width characters.
width is identical in effect to –w width.
DIAGNOSTICS
Possible exit status values are:
0 Successful completion.
1 An error occurred.
Messages
Message: file "filename" is binary
Cause: You specified the binary file filename as a fold input file. fold only works on
text files.
Action: Only specify text files as fold input files.
Message: input file "filename": system error
Cause: See syserror(3).
Action: See syserror(3).
Message: Missing width after -w
Cause: You specified the –w option without provide the width argument.
Action: Provide the missing width.
Commands and Utilities 1-241