[TxMt] TM2 -- rmate script ported to a shell script