#!/usr/bin/lua function setup_screen() os.execute("stty cbreak") end function restore_screen() os.execute("stty -cbreak") end function termout(s) io.stdout:write(s) end function reset_terminal() termout("\27c") end function home_cursor() termout("\27[H") end setup_screen() reset_terminal() home_cursor() print("hellooooo") home_cursor() print("world") restore_screen()