[geeks] Programming question.
    Dave McGuire 
    mcguire at neurotica.com
       
    Tue Apr  2 00:57:57 CST 2002
    
    
  
On April 1, Bill Bradford wrote:
> Okay, so far, I havent been able to figure out a way to do this, so any
> suggestions would be appreciated.
> 
> Compare two lists.  List A, and List B.
> I want to be able to then extract a list of 
> elements of List B that are *not* in List A.
> 
> In other words, a "diff", but *not* a positional/line-based
> diff (as with source code); I just want a "general" diff, if
> there is such a thing.  I'm looking at GNU diffutils now, but
> cant seem to find what I'm looking for.  
> 
> Basically, compare two arrays, show elements of array 2 that arent
> in array 1...  I dont care about position, just existence.
$ grep -v -f list_a list_b > outfile
     -Dave
-- 
Dave McGuire                    "...it's leaving me this unpleasant,
St. Petersburg, FL                 damp feeling on my shorts..." -Sridhar
    
    
More information about the geeks
mailing list