It's not clear from your question what exactly is that you want to achieve.
pv
is very similar to cat
in its simpler form so you might have two different cases:
cmp a.iso b.iso | pv
will process the output of the compare which might not give you an actual progress of the comparison task as the "result" could be empty (if the files are found to be the same) or much smaller than the actual original size of the compared files (given that you also don't know how big the result is going to be, it's impossible to compute the percentage...)
on the other hand pv a.iso | cmp - b.iso
will use a little trick in order to read a.iso
from the standard input and give you the progress of the file being fed to cmp
Haven't tried this myself but it should be the right way...
answered
12 May '10, 12:11
pmarini
286●2●16
accept rate:
28%
Please accept an answer, or provide more details so we can help.