#!/proj/tcl/install/5.x-sparc/bin/wish4.1 text .t -yscrollc {.sb set} scrollbar .sb -command {.t yview} button .b -text "Quit" -command {destroy .} pack .sb -side right -fill y pack .b -side bottom pack .t -side left -fill both -expand 1 # swap the #'s to enable 'foo | stdoutin.tcl': set f [open "|stdoutin.pl" r] #set f "stdin" fileevent $f readable { .t insert end "[gets $f]\n" .t yview end update idletasks }