2023-07-09 00:18:17 -07:00
|
|
|
# fold
|
2023-05-14 15:27:15 +02:00
|
|
|
|
|
|
|
> Folds long lines for fixed-width output devices.
|
2025-01-18 18:45:33 +05:30
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/fold-invocation.html>.
|
2023-05-14 15:27:15 +02:00
|
|
|
|
|
|
|
- Fold lines in a fixed width:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`fold {{[-w|--width]}} {{width}} {{path/to/file}}`
|
2023-05-14 15:27:15 +02:00
|
|
|
|
|
|
|
- Count width in bytes (the default is to count in columns):
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`fold {{[-b|--bytes]}} {{[-w|--width]}} {{width_in_bytes}} {{path/to/file}}`
|
2023-05-14 15:27:15 +02:00
|
|
|
|
|
|
|
- Break the line after the rightmost blank within the width limit:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`fold {{[-s|--spaces]}} {{[-w|--width]}} {{width}} {{path/to/file}}`
|