From 99e9e2131de970611306af156e5018508a8b97e3 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Fri, 21 Apr 2023 15:36:18 +1000 Subject: [PATCH] scriptlib update showargs.tcl to only show args, hello.tcl to emit on stdout & stderr --- scriptlib/hello.tcl | 3 +++ scriptlib/showargs.tcl | 29 ++--------------------------- 2 files changed, 5 insertions(+), 27 deletions(-) create mode 100644 scriptlib/hello.tcl diff --git a/scriptlib/hello.tcl b/scriptlib/hello.tcl new file mode 100644 index 00000000..6274cc97 --- /dev/null +++ b/scriptlib/hello.tcl @@ -0,0 +1,3 @@ +puts stdout "hello on stdout" +puts stderr "hello on stderr" + diff --git a/scriptlib/showargs.tcl b/scriptlib/showargs.tcl index 01003326..25bb97ec 100644 --- a/scriptlib/showargs.tcl +++ b/scriptlib/showargs.tcl @@ -1,32 +1,7 @@ -puts -nonewline stdout "info script\r\n" -puts stdout "[info script]" +#puts -nonewline stdout "info script\r\n" +#puts stdout "[info script]" puts stdout "::argc" puts stdout $::argc puts stdout "::argv" puts stdout "$::argv" -puts stdout "NS" -puts stdout "[namespace current]" - -if {[info exists ::test]} { - puts stdout "::test has existing value" - puts stdout "$::test" -} - -puts stdout "setting ::test to showargs-ran" -set ::test "showargs-ran" -puts stdout "doing basic check of stdin for data" -chan configure stdin -blocking 0 -set indata "" -if {![chan eof stdin]} { - #set indata [read stdin] -} -if {[string length $indata]} { - puts stdout "read from stdin:" - puts stdout $indata -} else { -puts stdout "-no stdin data read-" -} - - -