Earlier quoted context omitted.
Add pv (available in many standard repos these days, from http://www.ivarch.com/programs/pv.shtml if not) into the mix and you get a handy progress bar too.
Unless pv has gotten way more magical since the last time I used it, you also need to tell it how many bytes to expect if you want a progress bar. If it doesn't know how many bytes there will be, it just gives you a "throbber" (which is better than nothing, though).
cat file | pv | nc ...
and gzip
and so forth will result in a throbber as it can't query the pipe for a length.If you demoggify the first example to:
pv file | nc ...
you get a progress bar on the sending end without manually specifying a size.Even without a proper % progress bar, the display can be useful as you can at least see the total sent so far (so if you know the approximate final size you can judge completeness in your head) and the current rate (so you can see it is progressing as expected (so you get some indication of a problem such as an unexpectedly slow network connection, other than it taking too long)).