I'm looking a program to recursively inline all `\input{}` commands in a LaTeX file. By "recursively", I mean doing the inlining iteratively until no `\input{}` command remains in the final LaTeX file.

I've already come across the [flatten](http://ctan.org/pkg/flatten) package. But, for some reason, my TeXLive distribution doesn't install it. When I execute the command `sudo tlmgr show flatten`, I get the error message: `tlmgr: cannot find flatten`. So, I'm looking for alternative tools that are more standard and easier to install.