Getting timed output to display.
- From: "Cactus Paul" <dufus@xxxxxxxxxxxx>
- Date: Tue, 03 Jan 2006 21:06:03 GMT
newbe question, I thinks...
I would like to display in a window the output of iostat and like commands
as each line comes in.
I don't seem to be able to. It seems to wait until the end of all output
and then displays.
Here's the code.
#!/usr/sfw/bin/wish8.3 -f
#
button .iostat -text iostat -command {fill_view iostat}
text .text
pack .iostat .text
proc fill_view u_cmd {
.text delete 1.0 end
set f [open "|$u_cmd 5 5 " r]
for {gets $f line} {![eof $f]} {gets $f line} \
{.text insert end $line\n}
close $f
}
Any help and the dufus would be greatful.
.
- Follow-Ups:
- Re: Getting timed output to display.
- From: Gerald W. Lester
- Re: Getting timed output to display.
- Prev by Date: Re: expect problem
- Next by Date: I am in quoting hell
- Previous by thread: Re: set character at string position
- Next by thread: Re: Getting timed output to display.
- Index(es):