4 # Convert a file to Unix-style line endings
5 # If the file is a directory, then recursively
6 # convert all the files in the directory and below.
9 # f The name of a file or directory.
12 # Rewrites the file to have LF line-endings
16 if {[file isdirectory $f]} {
17 foreach g [glob [file join $f *]] {
22 set out [open $f.new w]
23 fconfigure $out -translation lf
24 puts -nonewline $out [read $in]
27 file rename -force $f.new $f
31 # Process each command-line argument