[NTG-context] Equivalent of os.resultof(...) in LaTeX

Herbert Voss Herbert.Voss at FU-Berlin.DE
Tue Nov 4 09:41:46 CET 2014


Am 04.11.2014 um 08:55 schrieb Xan:
> Xan <dxpublica at telefonica.net> ha escrit:
> 
> It does not work:>

That is not a useful error description ...

Herbert



 \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.
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 



More information about the ntg-context mailing list