Answer the question
In order to leave comments, you need to log in
How to validate a log file using bash and python?
There is a log file with hundreds of thousands of lines. You need to check that each line is valid json. If this is not the case, then output both the error line itself and the alleged error in this line.
Interested in a solution for both bash and python
Your thoughts gentlemen?
Answer the question
In order to leave comments, you need to log in
What didn't work for you?
For bash, the most straight forward option is json_pp . The system is often present by default
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question