in reply to Expect & top

You should be passing the command ("top") to spawn(), not send(). send() is used to give the spawned command input. use exp_internal() to debug the interaction between the command's output and the input you send to it.