Unix Programming - Find strings in one file that are not in other file

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > March 2006 > Find strings in one file that are not in other file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Find strings in one file that are not in other file
jeniffer

2006-03-19, 12:02 pm

Suppose I have two files N.txt and O.txt .N contains unique strings
that are sorted alphabetically .Similarly O also contains unique
strings that are sorted alphabetically .
I want to find those strings that are in N.txt but not in O.txt .The
condition is that both N and O.txt are very long files and contain only
1 string per line.How can this be done in the most shortest/efficient
way??(unix/linux commands )

Måns Rullgård

2006-03-19, 12:02 pm

"jeniffer" <zenith.of.perfection@gmail.com> writes:

> Suppose I have two files N.txt and O.txt .N contains unique strings
> that are sorted alphabetically .Similarly O also contains unique
> strings that are sorted alphabetically .
> I want to find those strings that are in N.txt but not in O.txt .The
> condition is that both N and O.txt are very long files and contain only
> 1 string per line.How can this be done in the most shortest/efficient
> way??(unix/linux commands )


man comm

--
Måns Rullgård
mru@inprovide.com
jeniffer

2006-03-19, 12:02 pm

Thanks a lot It worked !!!

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com