For mangling text??!! I think your example is way off topic for this
Thank you for your reply. I thought to write C code to accomplish this but next I found very powerful centos tools for this application from the help of you Gentlemen.