From mboxrd@z Thu Jan 1 00:00:00 1970 From: bluewind at xinu.at (Florian Pritz) Date: Fri, 10 Jan 2014 21:25:18 +0100 Subject: RFE: .so filters In-Reply-To: <20140110201144.GQ7608@serenity.lan> References: <20140109225802.GM7608@serenity.lan> <20140110090639.GN7608@serenity.lan> <52D029F9.40805@xinu.at> <52D0520C.1070609@xinu.at> <20140110201144.GQ7608@serenity.lan> Message-ID: <52D0572E.7080607@xinu.at> On 10.01.2014 21:11, John Keeping wrote: > Forking and using Lua in the child is an interesting idea. > > I need to investigate how Lua generally deals with I/O, but it feels > like it will be simpler to use a simple function interface than deal > with slurping in the input in Lua. Looks rather easy to slurp stdin (from http://www.lua.org/pil/21.1.html): > t = io.read("*all") -- read the whole file > t = string.gsub(t, ...) -- do the job > io.write(t) -- write the file -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: OpenPGP digital signature URL: