1826332 Members
3470 Online
109692 Solutions
New Discussion

Re: comparing 2 files

 
SOLVED
Go to solution
Elmar P. Kolkman
Honored Contributor

Re: comparing 2 files

I thought about that solution too, but what will it do with entries in t1 and not in t2 ?
Every problem has at least one solution. Only some solutions are harder to find.
Alex Ostapenko
Advisor

Re: comparing 2 files

Dear Elmar --

In my proposed solution, "grep" does nothing with extra entries in t1.modified. I understood Marcia's problem as that she did not need to know them. If she did need that info, then with the files already there (t1, t1.modified, t2, t3), one could:

cat t1 | grep -v -f t3

to get the result.

=:-) Alex
Alex Ostapenko
Advisor

Re: comparing 2 files

Whoops, I made a mistake in my last message. Need to create a t3.modified:

cat t3 | awk -F/ '{print $4}' >t3.modified

then:

cat t1 | grep -v -f t3.modified

Sorry!

=:-) Alex