Hi Bob,
Thanks a lot for your help. Got it to work. I realized that I was performing the string match operations in the wrong place. And I am not using the foreach command since the pipe is already being processed line by line.
proc redirect {} {
global infile pipe
set pipe...
Hi,
I have tried your suggestion. But the problem is that $input is not being recognized as a list of items by the foreach command. I guess it is processing the whole output as a single element. Hence it returns the whole output to the screen. Following is the code:
proc redirectnew {} {...
Hi all,
I trying to write the ouput of a program to a tk text widget. The program involved here is the top utility. I am creating a pipe and fileevent to see the information live. My code works if the open command is as follows:
if {[catch {open "|top -u $username -b" r+} input] } {
But...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.