Posted to tcl by mjanssen at Thu Oct 25 01:07:50 GMT 2007view raw
- set re {^$}
- fconfigure stdout -encoding binary -translation binary
- foreach file $argv {
- set line 0
- set f [open $file r]
- fconfigure $f -encoding binary -translation binary
- while {[gets $f buf] >= 0} {
- if {[regexp -- $re $buf]} {puts $buf}
- }
- close $f
- }