io - How to call an external program and pass a string as a stdin to it in lua? -
i'm writing simple script in lua. here's got stuck: i'd call external program , pass string it, sees stdin. how it?
you can use io.popen mode "w", returns file handler can write data to.
--test lua interpreter local f = io.popen("lua","w") f:write("print 'hello lua'") f:close() note function system dependent , not available in platforms.
Comments
Post a Comment