<div dir="ltr">Can you please tel me why this does not work with pdflatex --shell-escape test<br><br>
<style type="text/css">p, li { white-space: pre-wrap; }</style>
<p style="margin: 0px; text-indent: 0px;">\documentclass{minimal}</p>
<p style="margin: 0px; text-indent: 0px;">\usepackage{makeidx}</p>
<p style="margin: 0px; text-indent: 0px;">\makeindex</p>
<p style="margin: 0px; text-indent: 0px;">\makeatletter</p>
<p style="margin: 0px; text-indent: 0px;">\renewcommand\printindex{%</p>
<p style="margin: 0px; text-indent: 0px;">\immediate\closeout\@indexfile</p>
<p style="margin: 0px; text-indent: 0px;">\immediate\write18{makeindex \jobname.idx}</p>
<p style="margin: 0px; text-indent: 0px;">\input{\jobname.ind}}</p>
<p style="margin: 0px; text-indent: 0px;">\makeatother</p>
<p style="margin: 0px; text-indent: 0px;">\begin{document}</p>
<p style="margin: 0px; text-indent: 0px;">This is a test.</p>
<p style="margin: 0px; text-indent: 0px;">\index{Test}\index{Exam}</p>
<p style="margin: 0px; text-indent: 0px;">\printindex</p>
<p style="margin: 0px; text-indent: 0px;">\end{document}</p><br></div>