You're replying to a comment by P Fudd.

P Fudd Permalink
June 18, 2010, 18:05

I found a new way to use pv:

I've got a bunch of files (2000) being created by somebody else's program, and I wanted to monitor it with pv, but there's no point where pv could be inserted.

So, I got clever (I'm using tcsh):

In one window:
% start:
% find . -name '*.icm' | gawk '{printf "%5d\n",NR}' > a; comm -23 a b >> b; sleep 1; goto start

In another window:
% tail -f b | pv -s 12000 > /dev/null

The '12000' was calculated by hand (6 bytes*total number of files). And voila, a progress meter for a non-pipe!

To do this in bash, use a 'while' loop instead of using 'goto'.

Have fun!

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "halflife3_126": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.