problem with plotdf



On Wed, 2006-06-07 at 08:03 +0100, Jaime E. Villate wrote:
> Replace:
>     lappend omcommand [exec cat [lindex $argv 0]]
> 
> By:
>     set plotdata ""
>     set filename [lindex $argv 0]
>     set fd [open $filename "r"]
>     while {[eof $fd] != 1} {
>         gets $fd line
>         set plotdata [concat $plotdata $line]
>     }
>     lappend omcommand $plotdata
> 

Oops, I forgot to close the file; better yet:

    set plotdata ""
    set filename [lindex $argv 0]
    set fd [open $filename "r"]
    while {[eof $fd] != 1} {
        gets $fd line
        set plotdata [concat $plotdata $line]
    }
    close $fd
    lappend omcommand $plotdata

Jaime