sed '1d N : s/^\( *\)\(\w*\)\>\(.*\n *\)\2\>/\1\3/ t s/ */&0987654321\n/ s/.\{9\}\(.\).*/\1/m s/0/10/ s/ .*//mg'