Solved

Simple Tcl/TK Script to Dump Contents of a File to a Text Widget

Posted on 2003-12-04
2
289 Views
Last Modified: 2013-12-27
What I want to do would seem so simple, but since I'm new to Tcl/TK, I need a jump start from one of you folks. My question is this: how can I dump the contents of a file to a Text GUI?

Thanks!
0
Comment
Question by:pdouglas
2 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 125 total points
ID: 9882336
pack [text .t -width 80];
set f [open "./file" r];
while {[gets $f l]>=0} {.t insert end "$l\n"}
0
 

Author Comment

by:pdouglas
ID: 9895852
Thanks, ahoffman.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now