Posted to tcl by miguel at Sat Mar 05 19:24:57 GMT 2011view pretty
set file LOG.txt set chan [open $file r] set lines [split [read $chan] \n]close $chan set outfile [open /your/first/file w] foreach line $lines { puts $outfile $line if {[string match m* $line]} { close $outfile set outfile [open /your/second/file w] } }