We come across log file every now and then from various EDA tools in VLSI. The part of the log file that bothers us most is a warning and error. So a general question in TCL that how to print only the warnings from a given log file. In this article we are going to demonstrate our short and sweet TCL Code to extract the warnings from log file using TCL. This code an be sandwiched within your own TCL shell-code of the EDA Tool.
I was doing some research on the Internet to find out a particular file log which is not written by me. I was looking for a LOG file that is containing different types of warnings. Finally I found one and here it is :
You can see that of the some warning is followed by two messages. The second type of warning you can see these are sufficient in one line. Thus this is a good candidate for the code. Now with the blow info-graphics the code Flow & Organisation is described.
Now let us look into the TCL code :
Now in the above code you can see that we have dumped a output log file with the extraction of warnings from the input log file. I will advise you keep this practice because if suddenly the Terminal is closed you will not be able to recover the message. Whereas if the output is written into a file then you will be able to recover it. This habit will help you in long run.
For Code Execution & Live Demo please watch this video below :