latexmk

File Read

The read file will be part of the output.

echo '\documentclass{article}\usepackage{verbatim}\begin{document}\verbatiminput{/path/to/input-file}\end{document}' >/path/to/temp-file
latexmk -dvi /path/to/temp-file
strings temp-file.dvi

Inherit

This allows to run Perl code (`...`).

latexmk -e '...'

Shell

latexmk -pdf -pdflatex='/bin/sh #' /dev/null