Generate oneside and twoside version at the same time

Is there a possibility that with compiling my latex document all the time two PDFs are created (a oneside and twoside version). So in my case only the first line would be different for the two versions:

\documentclass[11pt, a4paper, oneside]{scrreprt}
\documentclass[11pt, a4paper, twoside]{scrreprt}

• Probably with arara or latexmk combined with one of these answers you can automatically compile your document twice, one for oneside and another for twoside. – Ignasi Mar 22 '16 at 8:56
• Printing on a Möbius strip? – Bernard Mar 22 '16 at 9:52
• don't use \documentclass in your .tex file and compile with pdflatex --jobname one \documentclass[11pt, a4paper, oneside]{scrreprt}\input{myfilename} & pdflatex --jobname two \documentclass[11pt, a4paper, twoside]{scrreprt}\input{myfilename} – touhami Mar 22 '16 at 13:05
• @Bernard For printing on a Möbius strip you only need \documentclass[11pt, a4paper, oneside]{scrreprt} ;) – principal-ideal-domain Mar 22 '16 at 16:44

If it's easier for you, you can also alter your .tex source file within a batch script during compilation. For example, here is an example using a DOS script.

Given a sample.tex file:

\begin{document}
\thispagestyle{empty}
Hello
\end{document}


The following batch file will create two different tex files and process them to give the shown output.

echo \documentclass[10pt]{article} > temp10.tex
type sample.tex >> temp10.tex
pdflatex temp10.tex

echo \documentclass[12pt]{article} > temp12.tex
type sample.tex >> temp12.tex
pdflatex temp12.tex