On Friday 25 August 2006 14:01, William O'Higgins Witteman wrote: > I have two files, one very long and the other much shorter. Every line > in the short file is also in the long file. What I need is a file with > every line in the long file *not* in the short file. Is there an easy > way to have vim provide me with my desired complementary file? > > Thanks.
If you are not particular about using vim and if you are using a Linux like OS, then you can do $diff temp1.txt temp2.txt | grep '^>' | cut -f 1 -d ' ' --complement For example $cat temp1.txt This is temp1.txt This is temp3.txt $cat temp2.txt This is temp1.txt This is temp2.txt This is temp3.txt This is temp4.txt $diff temp1.txt temp2.txt | grep '^>' | cut -f 1 -d ' ' --complement This is temp2.txt This is temp4.txt hth raju -- http://kamaraju.googlepages.com/cornell-bazaar http://groups.google.com/group/cornell-bazaar/about