Con speedtest-cli mi trovo bene.
Codice: Seleziona tutto
ndr:~$ echo "$(date +"%d/%m/%Y %H:%M:%S" ) --> $(speedtest-cli |grep 'Testing from\|Download\|Upload') "
11/08/2017 13:00:11 --> Testing from Orange (85.53.92.245)...
Download: 140.03 Mbit/s
Upload: 82.93 Mbit/s
ndr:~$ echo "$(date +"%d/%m/%Y %H:%M:%S" ) --> $(speedtest-cli |grep 'Testing from|Download|Upload') "
11/08/2017 13:01:32 -->
Pare che non si possa, ma usando tr si dobrebbe riuscire:
ndr:~$ echo "$(date +"%d/%m/%Y %H:%M:%S" ) --> $(speedtest-cli |grep 'Testing from|Download|Upload')" | tr '\n' ' '
ma toglie anche l'ultimo
Codice: Seleziona tutto
ndr:~$ echo "$(date +"%d/%m/%Y %H:%M:%S" ) --> $(speedtest-cli |grep 'Testing from\|Download\|Upload') " | tr '\n' ';'
11/08/2017 13:39:24 --> Testing from Orange (85.53.92.245)...;Download: 136.75 Mbit/s;Upload: 78.34 Mbit/s ;ndr:~$
Andrea