[NTG-context] Problem calling system
Procházka Lukáš Ing. - Pontex s. r. o.
LPr at pontex.cz
Thu May 17 10:52:18 CEST 2012
... Finally, I use the following to avoid ' in arguments and to keep " to os.execute():
----
\bgroup
\catcode`\%=11
\ctxlua{os.execute(([[echo lua -e "print 'EXECUTE'"]]):gsub("'(.-)'", "[[%1]]"))}
\egroup
% Or:
\startluacode
os.execute(([[echo lua -e "print 'EXECUTE'"]]):gsub("'(.-)'", "[[%1]]"))
\stopluacode
\starttext
A
\stoptext
----
None of both solutions are "pure" as I'd imagine but they seem to work.
Best regards,
Lukas
--
Ing. Lukáš Procházka [mailto:LPr at pontex.cz]
Pontex s. r. o. [mailto:pontex at pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4
Tel: +420 244 062 238
Fax: +420 244 461 038
More information about the ntg-context
mailing list