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.
 
 
 
 
 
 

21 lines
567 B

set exebase [file rootname [file tail [info nameofexecutable]]]
puts stdout "------------------------"
puts stdout "message from script"
puts stdout "exebase : $exebase"
puts stdout "::tcl_interactive : $::tcl_interactive"
puts stdout "::tclsh(istty) : $::tclsh(istty)"
puts stdout "------------------------"
if {!$::tcl_interactive} {
set data [read stdin]
puts stdout "stdin read: [string length $data] bytes"
puts stdout $data
}
if {"-dorepl" in $::argv} {
set ::tclsh(dorepl) 1
set ::tcl_interactive 1
}