Problems getting \input to process a command with a backslash in it

Jimi Damon jdamon at gmail.com
Thu Sep 19 21:18:44 CEST 2019


Hi,

I can't get a backslash to work in put \input  with piped input .

I've tried using
\
\backslash and
\textbackslash and each time I do that I get an error message saying

Too many }'s

or
? sh: 1: Syntax error: Unterminated quoted string



Here's the example

%file.tex
\documentclass[11pt]{article}
\begin{document}
Before
\input{|"cat demo.pgn | perl -pne \string'BEGIN\string{print q{blah* \*  }
. q/foo bar/ \string} \string' "}
After
\end{document}


%demo.pgn  is just empty

This example works with the forward slash inside of q{blah }

If I change it to q{blah \ }  q{blah \backslash} or q{blah \textbackslash}
I get these errors.


The same thing would happen with just a simple echo


\input{|"/bin/echo -ne \string'Foo \backslash\string' "}


Thanks for any suggestions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-live/attachments/20190919/b0770cb8/attachment.html>


More information about the tex-live mailing list