at least I assume this would best be done with sed/awk. I have a list of 900+ rpms that need to be installed to match a dev system.. problem is 400 of them are already installed so rpm is bitching then giving up.
I need to take my list of 400 "sorry blah.blah.blah is already installed" and remove the blah.blah.blah line from my script of 900+ wgets.
so I need to parse file 1 and each line that matches a line with that package in file 2, removes it from the resulting file 3. (at least that's my line of thought)
I'm not much of a programmer and I'm sure someone out there can figure this out in minutes compared to the many days it will take me to get this to work.
Here is a sample of lines from each file:
file1:
package basesystem-8.0-5.1.1 is already installed
file2:
wget
http://foo-server/RHEL5/basesystem-8.0-5.1.1.noarch.rpm
so file three will leave all of the wget for packages which do not appear in file1 (or some clever way of just removing those lines from file2.)
If there's an easier way to do this (ie: better way to run rpm -ivh *.rpm that won't choke) or using bash or perl, I'm open to enlightenment.