# how to insert the contents of an `\input`ed file into the source? [duplicate]

Is there a utility that will take a LaTeX source file, find all the `\input{some_external_file}` lines, and insert the contents of those external files into the master document without compiling to PDF? I could write my own script to do this but it seems like a common enough need that someone would have solved it already.