lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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/