From abb5058a31f42897d019764487c2fda4aac53d05 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Fri, 21 Apr 2023 22:21:43 +1000 Subject: [PATCH] more stdout/stderr example outputs in scriptlib/hello.tcl --- scriptlib/hello.tcl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/scriptlib/hello.tcl b/scriptlib/hello.tcl index 6274cc97..3f384438 100644 --- a/scriptlib/hello.tcl +++ b/scriptlib/hello.tcl @@ -1,3 +1,17 @@ -puts stdout "hello on stdout" -puts stderr "hello on stderr" +chan configure stdout -buffering none +chan configure stderr -buffering none +puts -nonewline stderr "1 hello on stderr with crlf newline\r\n" +flush stderr +puts -nonewline stdout "2 hello on stdout with crlf newline\r\n" +flush stdout +puts -nonewline stderr "3 hello on stderr with unix newline\n" +flush stderr +puts -nonewline stdout "4 hello on stdout with unix newline\n" +flush stdout +puts -nonewline stderr "5 hello on stderr no line-ending" +flush stderr +puts -nonewline stdout "6 hello on stdout no line-ending" +flush stdout + +