Initial Revision
[ohcount] / test / expected_dir / tcl1.tcl / tcl / code
1 proc Dos2Unix {f} {
2 puts $f
3 if {[file isdirectory $f]} {
4 foreach g [glob [file join $f *]] {
5 Dos2Unix $g
6 }
7 } else {
8 set in [open $f]
9 set out [open $f.new w]
10 fconfigure $out -translation lf
11 puts -nonewline $out [read $in]
12 close $out
13 close $in
14 file rename -force $f.new $f
15 }
16 }
17 foreach f $argv {
18 Dos2Unix $f
19 }