PSI sics-cvs-psi_pre-ansto
This commit is contained in:
22
inc.tcl
Normal file
22
inc.tcl
Normal file
@@ -0,0 +1,22 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# 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]
|
||||
}
|
||||
Reference in New Issue
Block a user