|
> execute("dir > temp_file.txt") and if you have pipes, you can use something like this: function shell(c) local input = _INPUT local o, h h = readfrom("| " .. c) o = read("*a") closefile(h) _INPUT = input return o end and then just shell("dir") will do what you want.