Using expect worked very well (I was able to collect and process data easily scripting in tcl language). Thanks a lot