Show me actual download speed


I wish to get the current download speed of my mac (as found in activity monitor) and script according to this value. I could get it by opening activity monitor, getting the proper argument “Data received/sec” and closing but, since I need to do this a number of times, I was wondering whether a more elegant/invisible way could be used, maybe with a shell ??

Many thanks for any help !!!