How do I capture multiple lines of the status output of a command?

I need to know what the upload speed of an Internet connection. I thought the easiest way to do this would be to transfer a file via FTP to my server using the command:

sh-3.2$ ftp -u ftp://username:password@computerdomain/directory/ file_to_be_uploaded

Note: My environment allows me to issue ONLY 1 line of code. That line of code can have multiple commands seperated by a semi-colon( ; ).

The above command works great in terminal. It uploads the file and gives me lots of text to tell me what is going on:

I'm after that last line in the form:
x bytes sent in mm:ss (y KB/s)

I want to obtain the value for y. I thought the way to do this would be to send the output to a text file:

sh-3.2$ ftp -u ftp://username:password@computerdomain/directory/ file_to_be_uploaded > ftpupload.txt

Problem is, all I get in ftpupload.txt is a previous line that has some useless error on it:

How can I get the contents of the last line so I know what the upload throughput is?

OR, can someone tell me a better way to do this?

Rob

you can't capture the ftp errors just like that..
redirect the ftp o/p to a file then grep for the suspected errors if found display warning messages

Thanks vidyadhar85! You gave me what I needed to find the answer.

It's a simple -v command on the FTP command line:

sh-3.2$ ftp -v -u ftp://username:password@computerdomain/directory/ file_to_be_uploaded | grep KB/s

That gives me exactly what I want.

Rob