I'm trying to use the comm command to compare two logs to see which apps have been installed but not removed. I don't want to use awk for this, if possible. Here's and example of the files:
2009-03-21 11:43:21 install flex-old:amd54 <none> 3.7.4a-10ubuntu1 2009-03-22 22:55:08 install libubsan0:amd54 <none> 6.3.0-1ubuntu1~14.04
2009-03-24 19:53:49 remove libubsan0:amd54 <none> 6.3.0-1ubuntu1~14.04
So the one that would need to be found as different is the "flex-old" line. Here is what I have tried, with some other variations:
comm -23 <(sort install.txt) <(sort removed.txt) > difference.txt
This outputs all of the installed list, not just the ones that aren't in common with the remove list. I've also tried:
comm -3 <(cut -d " " -4f sort install.txt | uniq) <(sort removed.txt | uniq) > what.txt
But, this outputs all the apps from both, but with the removed directly under the install.