I have a file called main.tex, which looks like this:
\begin{document}
\input{a.tex}
\end{document}
I want to know if it is possible to have it take this file a.tex in argument, such that I could compile it in a manner that depending on the argument it gives a different output automatically.
Something like pdflatex main.tex < a.tex > a.pdf