#! /bin/sed -f s/$/ / H $!d :b g s/ [^\n]*//g s/\n/ /g s/ //p g s/\(\n\)[^ \n]* /\1/g h /[^\n]/bb d