OK, I now understand why you want to use Expect. I'm using it in a similar way, but I never got to the problem that it's not reading the whole output. But you can still redirect the output to a file and then process this file (you might want to copy the file to your local machine first).