h s/. // s/ .*// s/./;&9876543210/g s/;\(.\)[^;]*\1/;/g t : s/\([^;]*\);/\1\1\1\1\1\1\1\1\1\1/ t G s/\n\(.\).*/\\x01\1/ t1 :1 s/\(.\)\x01\(.\)/\x01\2\2/ t1 s/..// G s/\n. [^ ]* /\x01\x02/ t2 :2 s/.\(\x01.*\)\x02\(.\)/\1\2\x02/ t2 s/\x01\|\x02//g
Note that non-ascii characters in the above source code will be escaped (such as \x9f).