assert(bash_start, "Sorry: Need privileges. (e.g.: run -power 208)") bash_start() bash_send('date\n') --bash_send('date\n') bash_send('exit\n') for i=1, 10 do os_sleep(500) local alive = bash_alive() out, err = unpack(bash_poll()) -- print err first so bash output looks prettier. if err ~= '' then print(err) end if out ~= '' then print(out) end if not alive then break end end if bash_alive() then bash_kill() end return 'ok'