[tex-live] writing kpsewhich output to a file

Ulrike Fischer news3 at nililand.de
Fri Apr 29 11:42:11 CEST 2016

When I compile this here **without** shell-escape (and an existing
blub.temp file)

%correct small bug in shellesc:
\protected\def\ShellEscape{\immediate\write18 }

\ShellEscape{kpsewhich article.cls    >> blub.temp}

\immediate\write18{kpsewhich book.cls >> blub.temp}


I get messages that the command has been executed
runsystem(kpsewhich book.cls >> blub.temp)...executed safely

but blub.temp is empty. I get the pathes only when using
--shell-escape. Is this to be expected? 

(I see some arguments why such redirections are disallowed but
wonder how I can catch the argument. I asked the question on tex.sx:

Ulrike Fischer 

More information about the tex-live mailing list