[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LUA os.execute help
- From: Gavin Wraith <gavin@...>
- Date: Sun, 15 Aug 2010 11:08:47 +0100
In message <20100815042616.A29832@xnet.com> you wrote:
> Instead, you want to concatenate the contents of the zz variable with
> the rest of the string going into os.execute().
>
> So you want something like this instead:
>
> os.execute("echo '" .. zz .. "' >>\etc\putty\putty1.log")
I usually avoid concatenations with
do
local cmd = "echo '%s' >>\etc\putty\putty1.log"
os.execute (cmd:format(zz))
end
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/