Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing document ???

Status
Not open for further replies.

6839470

Programmer
Mar 7, 2004
45
US
how to print the above set of lines using the above commands as it is with square brackets printed and flower brakets as well...
set fileid [open c:/filename w+]
puts $fileid ----------

???



sharedchannel samba { /* giants */
type = "giant";
protofiletype = "hart";
object = "limbo"; /* R(x) */
frame[0] = (-0.392350);
frame[1] = (-0.392350);
frame[2] = (-0.392350);
frame[3] = (-0.392350);
frame[4] = (-0.392350);
frame[5] = (-0.392350);
frame[6] = (-0.392350);
frame[7] = (-0.392350);
frame[8] = (-0.392350);
frame[9] = (-0.392350);
frame[10] = (-0.392350);
frame[11] = (-0.392350);
frame[12] = (-0.392350);
frame[13] = (-0.392350);
frame[14] = (-0.392350);
frame[15] = (-0.392350);
frame[16] = (-0.392350);
frame[17] = (-0.392350);
frame[18] = (-0.392350);
frame[19] = (-0.392350);
frame[20] = (-0.392350);
frame[21] = (-0.392350);
frame[22] = (-0.392350);
frame[23] = (-0.392350);
frame[24] = (-0.392350);
frame[25] = (-0.392350);
frame[26] = (-0.392350);
frame[27] = (-0.392350);
frame[28] = (-0.392350);
frame[29] = (-0.392350);
frame[30] = (-0.392350);
}
 
I don't understand what you want to do. Are you reading lines from a file and writing them to another file?
Code:
set infile [open <file1> r]
set out file [open <file2> w]
set lines [split [read $infile] \n]
close $infile
foreach line $lines {puts $outfile $line}
close $outfile

Bob Rashkin
rrashkin@csc.com
 
sorry I thought i was clear.......i am writing that to a file......the solution u posted does that work??
anyways will try
thanks
sumanth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top