I want to add progress bar while giving the percentage of the function to be completed such as [===>         ] 20% completed. For example, I have a code which uses iperf and I give the time duration that I want.
function Throughput_test()
{
    iperf -c $otherIP -u -b 1000m -t 10 -i1 
 # Here is where I want to add the progress bar. 
 # This function takes 10seconds and I want to 
 # see the progress bar.
}
 
     
    