How to get pid openned only ?

Andy5441

New Member
Credits
18
I have a history.log file

2020/06/06 23:59:13 | 437:test pid=020666 opened Boards 0, 1, 2, 3, 4
2020/06/07 00:05:36 | 437:test pid=020666 closed Boards 0, 1, 2, 3, 4
2020/06/09 20:59:13 | 437:test pid=020677 opened Boards 0, 1, 2, 3, 4
2020/06/10 00:05:36 | 437:test pid=020688 opened Boards 0, 1, 2
2020/06/11 23:59:13 | 437:test pid=020677 closed Boards 0, 1, 2, 3, 4
2020/06/12 00:05:36 | 437:test pid=020699 opened Boards 3, 4, 5, 6

How do i get a log with only opened Boards and with the active pid only ? If the pid number of open Boards is the same with closed Boards then we dont collect those in active.log ?
2020/06/10 00:05:36 | 437:test pid=020688 opened Boards 0, 1, 2
2020/06/12 00:05:36 | 437:test pid=020699 opened Boards 3, 4, 5, 6

I leaned shell script for a long time and did not use much, because I used windows .
Now if I have history.log I can grep opened Boards but will have with closed Boards same PID ; How do you write ksh to get the active.log with
2020/06/10 00:05:36 | 437:test pid=020688 opened Boards 0, 1, 2
2020/06/12 00:05:36 | 437:test pid=020699 opened Boards 3, 4, 5, 6

Thanks for showing me .
 


Members online


Top