I have a folder containing 95 tex files. I need to create a tex file all.tex that contains the following code:
\documentclass[10pt]{article}
\begin{document}
\input{file1.tex}
\input{file2.tex}
...
\input{file95.tex}
\end{document}
The file names do not have any pattern and hence I cannot use a loop. The above is just a working example.
I tried the following on bash:
printf '%s\n' *.tex | paste -sd "\n" - > all.tex
That creates an all.tex file that looks like this:
file1.tex
file2.tex
...
file95.tex
How do I add \input{} around the filenames? And how do I add the preamble etc.?
I am using bash (on Ubuntu) on Windows 10.