You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

#!/usr/bin/lua
--chan configure stdout -buffering none
io.stdout:setvbuf("no")
--chan configure stderr -buffering none
io.stderr:setvbuf("no")
--puts -nonewline stderr "1 hello on stderr with crlf newline\r\n"
io.stderr:write("1 hello on stderr from LUA with crlf newline\r\n")
--flush stderr
io.stderr:flush()
--puts -nonewline stdout "2 hello on stdout with crlf newline\r\n"
io.write("2 hello on stdout from LUA with crlf newline\r\n")
--flush stdout
io.stdout:flush()
--puts -nonewline stderr "3 hello on stderr with unix newline\n"
io.stderr:write("3 hello on stderr from LUA with unix newline\n")
--flush stderr
io.stderr:flush()
--puts -nonewline stdout "4 hello on stdout with unix newline\n"
io.write("4 hello on stdout from LUA with unix newline\n")
--flush stdout
io.stdout:flush()
--puts -nonewline stderr "5 hello on stderr no line-ending"
io.stderr:write("5 hello on stderr from LUA no line-ending")
--flush stderr
io.stderr:flush()
--puts -nonewline stdout "6 hello on stdout no line-ending"
io.stdout:write("6 hello on stdout from LUA no line-ending")
--flush stdout
io.stdout:flush()