Wrap Text

Wrap text at a specified character width.

Code

General
echo "$str" | fold -sw "$width"

Parameters

The text to wrap

Maximum line width

Server

More Bash Snippets