Posted to tcl by mr_calvin at Mon Jan 21 14:59:15 GMT 2019view raw
- % lmap fd [glob /proc/[pid]/fd/*] {if {[file exists $fd] && [string match pipe:* [file readlink $fd]]} { file tail $fd } else { continue }}
- % set pre [lmap fd [glob /proc/[pid]/fd/*] {if {[file exists $fd] && [string match pipe:* [file readlink $fd]]} { file tail $fd } else { continue }}]
- % open "|echo"
- file3
- % set post [lmap fd [glob /proc/[pid]/fd/*] {if {[file exists $fd] && [string match pipe:* [file readlink $fd]]} { file tail $fd } else { continue }}]
- 3
- % close $fh
- % set post2 [lmap fd [glob /proc/[pid]/fd/*] {if {[file exists $fd] && [string match pipe:* [file readlink $fd]]} { file tail $fd } else { continue }}]