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!

Help needed for puts cmd!!!

Status
Not open for further replies.

sergelaurent

Technical User
May 30, 2005
52
FR
I am trying write some data in a file using the puts cmd. I have noticed that after writing my data, the "puts" commands automatically add a '\n'. So if someone can tell me how to prevent this?

Thanks
lolo
 
Hi,

to keep puts from appending "\n" to the end of your string, use the -nonewline option:

Code:
set in [open $fileName w]
puts -nonewline $in $someString
close $in

Regards,
Tobi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top