lua-users home
lua-l archive

Re: Shadow shell error messages when running os.execute/io.popen from Lua

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


On Thu, Aug 29, 2013 at 4:35 PM, Pierre-Yves Gérardy wrote:
> local f = io.popen(command..' 2>&1 && echo " $?"')
I think the command separator should be a semicolon:
 io.popen(command..' 2>&1 ; echo " $?"')
Because '&&' means the 'echo " $?"' will only be executed if the
command succeeds.
 - Jeff

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