Originally Posted by H_TeXMeX_H
So, basically if you wanted to output all the entries present in both lists you would do:
comm -12 list1 list2 > list3
list3 would contain entries common to list1 and list2. There should be no spaces when used like this.
It would be useful if you post a more concrete example of what you want to do. So far, I'm guessing that you have 2 lists of the names of RPM packages and you want to list packages present on both lists ... well the above example should work.
The more tedious way would be to iterate over one file and see if there is a match in the other using grep like you did above except I would use the 'grep -x' option for better results.
Thanks for the reply..
So, the concrete example would be like this!!
I have the list.log
created from the script which has the RPM packages on each server in the format as shown below
Now, i have created a property file
which becomes a manual input to the script and which acts as a master file. This property file contains all the RPMs
that is currently used and it looks as below
What i need now is how can i read each of the server
name from the property file
and look into the list.log which is sorted as shown above
and compare under each of the server name entry
. And the output should be something like
RPM abc is missing in <Server_name>
can you please help me out in this?
Thanks in Advance