I am trying to display a progress bar in dialog using the output of rsync command. I found this answer
while doing my search. The answer is useful only if you are transferring a large number of uncompressed files. I am trying to transfer a single large compressed file. I tried the following:
rsync -a --progress test.tar.gz /media/sdb1 > test.txt
My output looks like this:
32768 0% 0.00kB/s 0:00:00
80510976 2% 76.75MB/s 0:00:48
I need the percentage data from the second column. Is there a way to print only 1 line of data at a time? Is there a better way of parsing the output of rsync command to obtain the percentage of progress?