in reply to Struggling to collect o/p of command using expect.

Since it's been a while and no one has replied yet, I figured I'd offer some general advice which might make it easier for others to offer specific help: