This script takes the piped input and extracts a pattern.
Plotting takes some time and because of that we need to save it to a log fie first.
$ <run your command> &> logs.txt
Once plotting is complete do the following
cat logs.txt | python3 stdin.py
&>
redirects the stdout and stderr to your log filecat <filename>
sends the output to stdoutpython3 stdin.py
runs the script|
pipes are used to direct output as input to next command
pattern:
Total plot creation time was XXXXX.XX sec
use test.txt to see this in action
$ cat test.txt | python3 stdin.py
^(Total plot creation time was ([0-9]{1,6}\.?[0-9]{1,2}) sec)