$ fmt -s -w80 file.txt
Jan. 22, 2012, 10:08 a.m.
—
Janos
Explanation
- It will break lines longer than 80 characters at appropriate white spaces to make them less than 80 characters long.
- The
-s
flag will collapse multiple consecutive white spaces into one, or at the end of a sentence a double space.