I am in need of some help on changing the way I am used to parsing some data. I have no problem getting the data I want from a file, but what I want this time is for the script to tell me what systems are missing a certain string of data. Once again I am in over my head and cannot figure this one out. I have tried to use regular expressions with an “if” loop to no avail to get the output I would like. Here is some sample data.
File one: One.log (input)
Computer1
KB893756
KB896422
KB896423
KB899588
KB899591
KB921883
Computer2
KB893756
KB896422
KB896423
KB899591
KB917159
KB921883
Computer3
KB893756
KB896422
KB899588
KB899591
KB917159
KB921883
This is the parsed data I am able to get myself from a much larger file. What I would like to do now is to check each grouping against a list and have it tell me which patch a computer does not have in it’s list. The list of patches on each computer is not set to a certain amount, it can and will change in what is does and does not have.
File two: Two.txt (input, patch list)
KB893756
KB893803
KB896422
KB896423
KB899588
KB899591
KB911927
KB921883
Could I get some help on how someone would go about doing this? If you do not feel like doing it for me, please get me started with some specific pointers if you are willing.
I need this outputted to a new file, and the patch list does not have to be a file if that is easier, but other patches will be added to the document as we need them there.