x s!$!4-55=76=87-99=110=211-312=513=614-715=917=018-119=320=421-522=723=824-926=127-227=828-930=131=232-333=539-144=850=555=667=078=383-489=1100-4111-2139=0166-8222=5! s!-.!&5\n!g s!=.!&0\n!g y!-=!..! P x G s!\(\S*\).!/^\1$/c! Wtest.sed s!!! h d
Note that non-ascii characters in the above source code will be escaped (such as \x9f).