Get a progress bar for a process in shell with pv – Pipe Viewer –

Monitor the progress accordingly to the number of lines in the output file.

In the example below, the target number of line for the output is 330000:

./get_weights.sh | pv -s 330000 -l > frames_weight.txt

Sample output:

 103k 0:13:27 [ 128/s ] [=============================>                                                                     ] 31% ETA 0:29:46
If you want to ask me a question or leave me a message add @bougui505 in your comment.