The specific application that got me thinking along these lines was
website maintenance. In my website (under construction at
http://www.kcl-phs.org.uk/rogernewson/ ), I have multiple .htm files,
.toc files, .pkg files, .zip files, .ado files and .do files. When I add
packages to my website, I run a Stata program that reads all the .pkg
files, collects the title line in each one, and generates lists of
packages in the .toc files and in tables in the .htm files. A package
such as - -intext- would make it easier to add further bells and
whistles. However, there are probably many other file-bashing
applications where this approach would be less bother, and more
reliable, than a mixture of manual text editing and DOS scripts.
One word of advice: perl.