I have the following line in a shell script:
bandwidthOutput=$(iperf3 -c 127.0.0.1 -R --parallel 5 --format M --version4)
And I want to only save the average bandwidth (Upload speed) in $bandwidthOutput. How do I do this?
I tried using awk, but I could not find any information of where in the Output this information could even be found.
Edit:
From my understanding my line in the shell script should be able to output this data in the last line, but I am unsure.
So I actually have two Questions:
- Where do I find the average bandwidth with Iperf3? I think it is in the last line [SUM]
- How do I then Output only that data with awk?
-I tried Outputting the 5th Element of the last line, but this looks different from the Output I see in the window of my server (run with iperf3 -s)