The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-18-2008
forumthreads forumthreads is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 20
Ignore identical lines

Hello Experts,

I have two files called "old" and "new". My old file contains 10 lines and my new file contains 10 + "n" lines.

The first field in both these files contain ID. I sort these two files on ID. I am interested in only the lines that are in the new file and not in old.

I tried the below but was not successful

awk -F"\t" '{a[$] = $0} END { for (x in a) { print a[x] } }' maout > nodup

I have attached a file which gives an example of how my input files look like and the output i expect

Any suggestions would be appreciated.

Many Thanks in advance.
Attached Files
File Type: txt Input & Output.txt (896 Bytes, 19 views)