I want to get the return of the bash script speedtest-cli (it is used to check the speed of the internet), my system is CentOS.
This is the return of ./speedtest-cli:
[root@192 ~]# ./speedtest-cli Retrieving speedtest.net configuration... Testing from Oi Velox (179.198.68.183)... Retrieving speedtest.net server list... Selecting best server based on ping... Hosted by Station Net Provedor (Duque de Caxias) [10.54 km]: 37.818 ms Testing download speed................................................................................ Download: 50.2 Mbit/s Testing upload speed................................................................................................ Upload: 12.69 Mbit/s
I want a bash script that gets this part of the return "Download: 50.2 Mbit/s" and save it in a variable, how can I do this?
PS: This is my CentOS 6.9 Server located in Rio de Janeiro, Brazil.