Note: this is just a reminder about Windows analogues of grep - find and findstr.
Being inspired by this article: http://habrahabr.ru/post/71568/
now leaving some how-to's when working with large log files, containing messages from many processes.
How to get all messages from a process with PID=8238
C:\logs> type file.log | find "8238"
2014-09-19 16:40:22 8238 [INFO] Closing Session
2014-09-20 16:40:22 8238 [INFO] Closing Session
2014-09-22 16:40:35 8238 [WARNING] Error: No IC output on selected net (i.e., no driver).Stopping.
2014-09-22 16:40:50 8238 [INFO] Close Session: Design file: demo2.p
2014-09-22 16:41:38 8238 [INFO] Close Session: Design file: demo2.p
2014-09-26 15:45:11 8238 [INFO] Close Session: Design file: demodiff.p
How to get messages from interval [2014-09-22, 2014-09-26]
C:\logs> type file.log | findstr /r /C:"2014-09-2[2-6]"
2014-09-22 16:40:22 [INFO] Closing Session:
2014-09-22 16:40:35 [WARNING] Error: No IC output on selected net (i.e., no driver).Stopping.
2014-09-22 16:40:50 [INFO] Close Session: Design file: demo2.p
2014-09-22 16:41:38 [INFO] Close Session: Design file: demo2.p
2014-09-26 15:45:11 [INFO] Close Session: Design file: demodiff.p
Note that /r stands for regular expressions. But regexps are limited in findstr, only [class] or [a-b] is allowed. See http://technet.microsoft.com/ru-ru/library/bb490907.aspx for reference.
Being inspired by this article: http://habrahabr.ru/post/71568/
now leaving some how-to's when working with large log files, containing messages from many processes.
How to get all messages from a process with PID=8238
C:\logs> type file.log | find "8238"
2014-09-19 16:40:22 8238 [INFO] Closing Session
2014-09-20 16:40:22 8238 [INFO] Closing Session
2014-09-22 16:40:35 8238 [WARNING] Error: No IC output on selected net (i.e., no driver).Stopping.
2014-09-22 16:40:50 8238 [INFO] Close Session: Design file: demo2.p
2014-09-22 16:41:38 8238 [INFO] Close Session: Design file: demo2.p
2014-09-26 15:45:11 8238 [INFO] Close Session: Design file: demodiff.p
How to get messages from interval [2014-09-22, 2014-09-26]
C:\logs> type file.log | findstr /r /C:"2014-09-2[2-6]"
2014-09-22 16:40:22 [INFO] Closing Session:
2014-09-22 16:40:35 [WARNING] Error: No IC output on selected net (i.e., no driver).Stopping.
2014-09-22 16:40:50 [INFO] Close Session: Design file: demo2.p
2014-09-22 16:41:38 [INFO] Close Session: Design file: demo2.p
2014-09-26 15:45:11 [INFO] Close Session: Design file: demodiff.p
Note that /r stands for regular expressions. But regexps are limited in findstr, only [class] or [a-b] is allowed. See http://technet.microsoft.com/ru-ru/library/bb490907.aspx for reference.