-- os.execute はプログラムとしてのリターン値が返ってくるが、 -- os.shell_execute は対象プログラムの出力文字が返ってくる。 function os.shell_execute(str_command) local handle = io.popen(str_command) local result = handle:read("*a") handle:close() end