From 6e779a05205074e892bbe62a05bdb72718a70896 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Sat, 27 Apr 2024 00:48:35 +0200 Subject: [PATCH] Use lua io.write() instead of print() io.write() gives better output control as print() is hardcoded to always print a newline. --- examples/lua/automatic-linux-login.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/lua/automatic-linux-login.lua b/examples/lua/automatic-linux-login.lua index b700f78..a287b40 100644 --- a/examples/lua/automatic-linux-login.lua +++ b/examples/lua/automatic-linux-login.lua @@ -22,8 +22,8 @@ if (1 == found) then expect("Password:") send(login.password .. "\n") else - print("\r\nDon't know login info for " .. hostname .. "\r\n") + io.write("\r\nDon't know login info for " .. hostname .. "\r\n") end else - print("\r\nDidn't find a login prompt\r\n") + io.write("\r\nDidn't find a login prompt\r\n") end