Here an example with awk
:
user@host:~# echo "3.80 Mbits/sec" | awk '{printf "%s %s%%\n", $0, $1/(10.0/100)}'
3.80 Mbits/sec 38%
To apply to your script just add the awk
part after your command:
echo -e " \t $(awk '/Bandwidth/ {getline}; END{print $7, $8}' /tmp/iperf.log" | awk '{printf "%s %s%%\n", $0, $1/(10.0/100)}'