Hi,...

Hi,

You can use expect http://expect.nist.gov/ to automate the task, and user autoexpect to generate the script, just see it and you will know how easy it is.

Click Here!