{a[NR]=$0 l=length($0) m=m<l?l:m}END{q=m+4 while(q--)s=s"#" print s while(i<NR+2)printf"# %-"m"s #\n",a[i++] print s}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page