in reply to Re^3: Expect & top
in thread Expect & top

Check out Re: Obtaining data from the top command via a pipe for an explanation.