Files
sics/inc.tcl

23 lines
597 B
Tcl

#---------------------------------------------------------------------------
# This script reads a file specified on the command line line by line.
# Each line is than enclosed with puts " line " . You obtain a tcl file
# which prints the text in the file
#
# Mark Koennecke October 1996
#--------------------------------------------------------------------------
if {$argc < 1} {
puts "Usage: tclsh inc.tcl file_to_Convert"
exit
}
set file [lindex $argv 0]
set f [open $file r ]
while { ! [eof $f] } {
gets $f line
set line [string trimleft $line]
puts [format "puts \" %s \" " $line]
}