lua-users home
lua-l archive

Re: passing variables to io.popen

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


On Thu, Dec 9, 2010 at 10:15 AM, Yehuda Eisenstark wrote:
> f = io.popen("/usr/bin/scan", filename)
> That obviously does not work. How do I pass the "filename" variable to the
> /usr/bin/scan script?
Maybe try:
 f=io.popen("/usr/bin/scan " .. filename)
(Note the space after "scan")
You might need to do some additional quoting if your filename
contains spaces, etc.
 - Jeff

AltStyle によって変換されたページ (->オリジナル) /