wrong # args: should be "exit code"
    while executing
"exit"
    (in namespace eval "::request" script line 26)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

#!/usr/local/bin/tclsh set Lf [glob "ordali_*.tcl"] foreach f $Lf { set foo [open $f r] set Ll [split [read -nonewline $foo] "\n"] close $foo set NL {} foreach l $Ll { set l [string trim $l] if {[regexp "foreach \{" $l] && ([string range $l end-1 end] eq "{}")} { regsub -all { +} $l " " l puts "$l" set ip [string first "{" $l] set id [string first "}" $l] set l "lassign [string range $l [expr {$id+2}] end-3] [string range $l [expr {$ip+1}] [expr {$id-1}]] " puts "$l" } lappend NL $l } set foo [open $f w] puts $foo [join $NL "\n"] close $foo } exit