[NTG-context] Equivalent of os.resultof(...) in LaTeX
Xan
dxpublica at telefonica.net
Tue Nov 4 08:55:26 CET 2014
On Mon, 3 Nov 2014 14:31:17 +0100
Xan <dxpublica at telefonica.net> ha escrit:
> It does not work:> \documentclass{article}
> > \begin{document}
> > \directlua{
> > local handle = io.popen("sha256sum \jobname.tex | cut -c -5","r")
> > if handle then
> > local result = handle:read("*all") or ""
> > handle:close()
> > tex.print(result)
> > end
> > }
> > \end{document}
>
> Neither this:
>
> > \directlua{
> > require "lualibs-os"
> > tex.sprint(os.resultof("sha256sum \jobname.tex | cut -c -5"))
> > }
>
>
> Blank. Nothing displayed.
More information about the ntg-context
mailing list