2025-03-14 21:59:59 -06:00
|
|
|
# fold
|
|
|
|
|
|
|
|
|
|
> Folds long lines for fixed-width output devices.
|
|
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/fold-invocation.html>.
|
|
|
|
|
|
|
|
|
|
- Fold lines in a fixed width:
|
|
|
|
|
|
2025-04-03 20:36:56 -06:00
|
|
|
`fold {{[-w|--width]}} {{width}} {{path/to/file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Count width in bytes (the default is to count in columns):
|
|
|
|
|
|
2025-04-03 20:36:56 -06:00
|
|
|
`fold {{[-b|--bytes]}} {{[-w|--width]}} {{width_in_bytes}} {{path/to/file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Break the line after the rightmost blank within the width limit:
|
|
|
|
|
|
2025-04-03 20:36:56 -06:00
|
|
|
`fold {{[-s|--spaces]}} {{[-w|--width]}} {{width}} {{path/to/file}}`
|