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)

MaciekS
  • 277

1 Answers1

3

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

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