Author: KatolaZ sfmt ====== $ sed ':c;$b;/^[ \t]*$/b;/^.\{,69\}$/{h;s///;N;/^\n[ \t]*$/{;H;g;s/\n\n*/\n/;bt;};s/^\n[ \t]*//;s/[ \t][ \t]*$//;H;g;s/\n\n*/ /g;s/[ \t][ \t]*$//;bc;};:t;/^.\{,70\}$/!{s/^\(.\{1,70\}\)\([ \t][ \t]*\)\(.*\)$/\1\n\3/;s/[ \t]*$//;P;D;}' Explanation: A simplified fmt(1) that wraps lines to 70 spaces and handles paragraphs Comment: yes, it's longer than 128 bytes, but I am sure there exists at least one screen where it fits in exactly one line....