home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource.old
/
todos.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
355b
|
17 lines
# This re-writes a file, which in the process converts all
# the end-of-line characters to Windows-style cr-lf.
proc ToDos {pat} {
# pat is a glob pattern
foreach f [glob $pat] {
puts $f ; update
set in [open $f]
set X [read $in]
close $in
set out [open $f w]
fconfigure $out -trans crlf
puts -nonewline $out $X
close $out
}
}