echo 0TONYHLDGS201307240901201307240000000496 | perl -pe 's/(\d{10})$/sprintf("%01 0d",$1-2)/e'