\immediate\write18{echo X >temp.tex}
X\ignorespaces \input temp\relax \removeunwantedspaces X
</texcode>
== Piping ==
''From [[User:Taco|Taco]]'s post on the mailing list:''
Latest pdfTeX allows piping:
\input "|ruby ./myscript.rb \vartest XXXXXXXXX"
the magic trick is the | symbol. With the current tex:
<texcode>
\writ18{ruby ./myscript.rb \vartest XXXXXXXXX > whatever.tex}
\input whatever % or something using \openin ...
</texcode>