couldn't open "ordali_aligne.tcl": permission denied
    while executing
"open $f w"
    ("foreach" body line 18)
    invoked from within
"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..."
    (in namespace eval "::request" script line 4)
    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