~sircmpwn/ctools

ref: f2d583864b4c95633f8897b3e1d44b2fa5352899 ctools/doc/fold.1.scd -rw-r--r-- 1.3 KiB View raw
f2d58386 — Gabor Koszegi Implement fold 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
fold(1) "ctools"

# NAME

fold - fold lines of input files

# SYNOPSIS

*fold* [-bs] [-w _width_] [_file_...]

# DESCRIPTION

*fold* will break the lines of every input _file_ into segments which will have
at most _width_ columns. By default, the column positions will be calculated in
the sense of characters' display width.

If no input file is given or "-" is listed as a filename, _stdin_ will be used
as input.

# OPTIONS

*-b*
	Count _width_ in bytes.

*-s*
	If a word should be broken at the end of the segment, the segment will end
	after its last blank character, if such character exists.

*-w* _width_
	_width_ specifies the maximum length of the segments. The default width is
	80 columns.

# UNSPECIFIED BEHAVIOR

The POSIX standard does not unambiguously specify the behavior of this command
under certain conditions. Under such conditions, the ctools implementation of
*fold* behaves as follows:

- If *-w* is a not a positive integer, fold will print an error and exit with a
  non-zero status code.

# DISCLAIMER

This command is part of ctools and is compatible with POSIX-1.2017, and may
optionally support XSI extensions. This man page is not intended to be a
complete reference, and where it disagrees with the specification, the
specification takes precedence.