lua-users home
lua-l archive

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


I have a function which receives a variable and want to pass that variable to a shell command. From the examples I've seen, io.popen is the way to go (please correct me if I'm wrong). So far I have:

function main(filename)
{
f = io.popen("/usr/bin/scan", filename)
l = f:read("*a")
print(l)
}

That obviously does not work. How do I pass the "filename" variable to the /usr/bin/scan script?

Thanks,

Y