sed ': s/[1-9]/&-/g y/123456789=/012345678-/ t s/--/=/g s/-0/5/g s/-/_/ t s/0//g :0 s/_/<<123456789_01>/ s/\(.\)<.*\1\(_*.\).*>/\2/ t0'