local r = os.execute("bla") if r == 0 then print("0") elseif r == 1 then print("1") elseif r == 2 then print("2") else print("else") end