I just couldn’t find one, so I ended up using this line:
cat <textfile> | perl -e 'use Text::Wrap;$Text::Wrap::columns=70;
while(<>) {print wrap("","",$_)}'
I just couldn’t find one, so I ended up using this line:
cat <textfile> | perl -e 'use Text::Wrap;$Text::Wrap::columns=70;
while(<>) {print wrap("","",$_)}'
fmt is one of the GNU coreutils
@Kevin: Thanks. That’s what I was looking for. But very hard to find if you search for “word wrap”.
fmt -s -w70 does almost the same as this perl line. The fine difference is, that fmt doesn’t split words, that are longer than the line width.