Hi @mlmyers,
Take a look this package. It has many functionality for the text base files.
Regards Balamurugan.S