Skip to content

Python script used to do pattern-matching on log outputs from a shell script.

Notifications You must be signed in to change notification settings

FominSergiy/chia-madmax-logs-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

crypto - data parser

This script takes the piped input and extracts a pattern.

Suggested Use

save your plottting into a log.txt file

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 file
  • cat <filename> sends the output to stdout
  • python3 stdin.py runs the script
  • | pipes are used to direct output as input to next command

General overview

pattern: Total plot creation time was XXXXX.XX sec

use test.txt to see this in action

$ cat test.txt | python3 stdin.py

Regex used

^(Total plot creation time was ([0-9]{1,6}\.?[0-9]{1,2}) sec)

Pre-Requisites

python3

About

Python script used to do pattern-matching on log outputs from a shell script.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages