1 # Internally, open "|..." calls out to popen from tclcompat.tcl
3 # This code is compatible with Tcl
6 set f
[open |
[list cat | sed
-e "s/line/This is line/" >temp.out
] w
]
7 puts "Creating temp.out with pids: [pid $f]"
8 foreach n
{1 2 3 4 5} {
14 set f
[open "|cat temp.out"]
15 puts "Reading temp.out with pids: [pid $f]"
16 while {[gets $f buf
] >= 0} {