*Luaで良く作る関数 ~io編~ [#tfd3313e]

*Luaで良く作る関数 ~os編~ [#p9a13de3]
-[[os.shell_execute>#os_shell_execute]]

&aname(os_shell_execute);
**os_shell_execute [#y0b72b1d]
#sh(lua){{
-- 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
}}

トップ   差分 履歴 リロード   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS