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)

1 Answer 1

3

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

1
  • 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, 2019 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .