1

I am testing the shell escape option, but I am stuck on a very early level -trying to do: \input{|"time /t"}}. My pdfLaTeX is complaining:

! LaTeX Error: File `|"time /t".tex' not found.

As far as I know (from other answer):

When shell escape is active and the primitive \input finds a |, it accepts as input the standard output of the following shell command.

I do not understand why \input is interpreting the command as file name in my case, as it is prepended with |.

My test code:

\documentclass{article}

\title{Shell escape test}
\author{MaciekS}

\begin{document}

Current time: \input{|"time /t"}

\end{document}

I tried running the code with both --shell-escape and --enable-write18.

Using pdfLaTeX version: MiKTeX-pdfTeX 2.9.6354 (1.40.18)

3

With miktex you need the options --enable-pipes --shell-escape for this.

  • That's the option I needed. Thanks! For some reason on other PC with MikTeX installed this worked with just --shell-escape. – MaciekS Jan 9 at 15:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.