1

I have a log file of a build which has about 11MB in size if the build is successful. I want to create a visual progress bar (just about in any language, preferably in python or JS) which progresses when the log file is written a line to, or when it grows in size. The build takes around two hours, I'm open to suggestions to create the progress bar based on time and stop the bar when I get an error I capture with sed or awk. Any ideas? Thanks in advance.

I have a couple of known errors I can check to stop the progress of the bar when they're encountered, I'm thinking of using sed or awk.

Drgmrsc
  • 61
  • 6
  • This question is very similar to https://stackoverflow.com/questions/58447501/progress-bar-while-unix-find-command-is-executing/58448678#58448678 – Jon Nov 05 '19 at 09:59

1 Answers1

1

Consider using 'pv' to monitor progress of the file. You can specify the estimated size with --size

tail -n +1 -f /path/to/log | pv --size 11000000  > /dev/null
dash-o
  • 13,723
  • 1
  • 10
  • 37